I think I can make the gcc compiler see the mpi.h by adding the -I argument and the folder of the mpi.h and similarly the -L to the library path, this compiled the code with no problems.<br><br>However it is not linking to libmpi or libmpi.a, giving me the following errors:<br>
<br>*********************************************************<br>/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find<br> -libmpi.a<br>collect2: ld returned 1 exit status<br>*********************************************************<br>
<br>this happens when I use -libmpi or -libmpi.a in the gcc command<br><br>I think this has to do with the library reference name not defined to link with, I am not sure how to solve this, google gives me general explanation on library names, <br>
<br>I am not sure if I should post this in gcc or linux forums, but I hope someone here could help, <br><br>thanks again, <br><br>Manal<br><br><div class="gmail_quote">2008/10/28 Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span> There are two ways you can compile your MPI
program using MPICH2 on windows,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>1. Install MPICH2 on windows</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span># Use MS Visual Studio compiler to compile your MPI
source to generate an exe (Use mpi.lib while linking).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span># Use gcc from cygwin to compile your MPI source (Use
libmpi.a while linking).</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>2. Configure/make/install MPICH2
on Cygwin</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span># Use the mpicc script after installing MPICH2 to
compile your MPI program.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span> Let us know if you need further
information.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Regards,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Jayesh</span></font></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a>
[mailto:<a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a>] <b>On Behalf Of </b>Manal
Helal<br><b>Sent:</b> Sunday, October 26, 2008 11:31 PM<br><b>To:</b>
<a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br><b>Subject:</b> [mpich-discuss] need to compile
unix code as windows exe<br></font><br></div><div><div></div><div class="Wj3C7c">
<div></div>Hi<br><br>I need to compile Unix code under windows generating an exe
file. I downloaded cygwin with gcc and make (that what I use on Solaris and
Linux flavors) , and downloaded mpich2 for windows which didn't contain mpicc
this is what I use in my make files.<br><br>Will you please advise on the
easiest efficient way to compile Unix code on a windows platform and link to
mpich in the compilation process? sorry if it is a basic question, I searched
google, and couldn't get an easy step by step tutorial that covers all
requirements.<br><br>Thank you very much in advance, <br><br>Kind Regards,
<br><br>Manal<br></div></div></div>
</blockquote></div><br>