Thanks for your reply Jayesh.<br><br>I had the 64bit version of MPICH2 installed but do not have the 64bit components enabled in VS. So I decided to try uninstalling the 64bit version of MPICH2 and installed the 32bit version.<br>
<br>I tried running my helloworld program again and am no longer getting the linker error I was previously :) Unfortunately I know get another error :(<br><br>Error while connecting to host, No connection could be made because the target machine actively refused it. (10061)
<br>Connect on sock (host=<a href="http://my.host.name" target="_blank">my.host.name</a>, port=8678) failed, exhaused all end points
<br>Unable to connect to '<a href="http://my.host.name:8678" target="_blank">my.host.name:8678</a>',
<br>sock error: Error = -1<br><br>Maybe I didn't configure something correctly during setup. I would have thought this was due to the firewall but I did make sure that mpiexec and smpd are not blocked by windows firewall. Maybe I just need to bite the bullet and reinstall VS with 64bit components enabled and reinstall the 64bit version of MPICH2.<br>
<br><div class="gmail_quote">On Mon, May 2, 2011 at 8:19 AM, Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov" target="_blank">jayesh@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
# Make sure that you installed the 64-bit version of MPICH2.<br>
# Make sure that you select the "solution platform" in VS to be "x64" (Usually the default one is "Win32" . There should be a drop-down box on the top of the VS interface that allows you to select the "solution platform" - You might have to select "Configuration Manager" and create a new "Active Solution platform". You might find more help in the VS help docs.)<br>
# Make sure that the paths specified to MPICH2 libs are correct.<br>
<br>
-Jayesh<br>
<div><div></div><div><br>
----- Original Message -----<br>
From: "Ryan Price" <<a href="mailto:ryprice00@gmail.com" target="_blank">ryprice00@gmail.com</a>><br>
To: <a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br>
Sent: Sunday, May 1, 2011 6:08:14 PM<br>
Subject: [mpich-discuss] lnk 2019 error, hellow world on windows 7 (64bit), VS2008<br>
<br>
<br>
<br>
Hi,<br>
<br>
I'm just trying to get a mpi hello world program up and running and can't seem to get it to build properly. I'm on windows7 using VS2008.<br>
<br>
I get this error:<br>
1>myprog.obj : error LNK2019: unresolved external symbol _MPI_Finalize referenced in function _main<br>
1>myprog.obj : error LNK2019: unresolved external symbol _MPI_Comm_size referenced in function _main<br>
1>myprog.obj : error LNK2019: unresolved external symbol _MPI_Comm_rank referenced in function _main<br>
1>myprog.obj : error LNK2019: unresolved external symbol _MPI_Init referenced in function _main<br>
1>E:\Visual Studio 2008\Projects\myprog\Debug\myprog.exe : fatal error LNK1120: 4 unresolved externals<br>
<br>
I've seen many posts with similar problems but unfortunately I haven't been able to solve the issue on my own. It looks like it's not seeing where my compiled mpi libs are but I have specified the MPICH2 libraries as "Additional dependencies" for the linker (set the path of MPICH2 libraries in "Additional library directories" and added mpi.lib as "Additional dependencies"). I have tried compiling with both VC++ and IntelC++, both of which have the directories for the include files and library files set under tools->options as well.<br>
<br>
Not sure what else to try. Any help is greatly appreciated.<br>
<br>
Thanks,<br>
<br>
Ryan<br>
</div></div>_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</blockquote></div><br>