[mpich-discuss] LNK2019 error on Windows 7 and Visual Studio 2008 using MPI

Jayesh Krishna jayesh at mcs.anl.gov
Thu Jul 26 11:52:03 CDT 2012


Hi,
 Good to know MPICH2 worked for you. However if your system is x64 I would recommend installing the x64 version of MPICH2 and building a x64 executable (In VS you might have to change the build configuration. Google for building 64-bit apps using VS.).

Regards,
Jayesh

----- Original Message -----
From: "Darcy Allison" <plasma.simulation at gmail.com>
To: mpich-discuss at mcs.anl.gov
Sent: Thursday, July 26, 2012 10:53:52 AM
Subject: Re: [mpich-discuss] LNK2019 error on Windows 7 and Visual Studio 2008 using MPI

I uninstalled the 64-bit version and installed the 32-bit version of 
MPICH2 and now my code compiles in Visual Studio. It does this with just 
the mpi.lib without the cxx.lib file in the Additional Dependencies box. 
Thanks for the help.

On 7/26/2012 11:03 AM, Jayesh Krishna wrote:
> Hi,
>   Are you linking your application with the correct libraries? If you have installed 64-bit version of MPICH2 make sure that you are building a 64-bit application (to link with the libs).
>
> Regards,
> Jayesh
>
> ----- Original Message -----
> From: "Darcy Allison" <plasma.simulation at gmail.com>
> To: mpich-discuss at mcs.anl.gov
> Sent: Wednesday, July 25, 2012 3:55:05 PM
> Subject: Re: [mpich-discuss] LNK2019 error on Windows 7 and Visual Studio 2008 using MPI
>
>
> Thanks for the suggestion but I still get the same five errors which are:
>
> 1>Linking...
> 1>main.obj : error LNK2019: unresolved external symbol _MPI_Finalize referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol _MPI_Comm_rank referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol _MPI_Comm_size referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol _MPI_Init referenced in function _main
> 1>Y:\ModelCenter_LinkingCodes\zonair_mpi\Debug\zonair_mpi.exe : fatal error LNK1120: 4 unresolved externals
>
>
> On 7/25/2012 4:42 PM, Scott Hill wrote:
>
>
> Try adding cxx.lib in the Additional Dependencies where you added mpi.lib.
>
>
>
>
>
> On Jul 25, 2012, at 12:43 PM, Darcy Allison wrote:
>
>
> Finally, I go to Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies. I then put mpi.lib into the box.
>
>
> _______________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov To manage subscription options or unsubscribe: https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss

_______________________________________________
mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
To manage subscription options or unsubscribe:
https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list