IamMan
IamMan

Reputation: 442

Linker error with Microsoft HPC Pack 2008 SDK

I tryed to write program with using OpenMP and MPI in Windows 7 x64. I found tutorial, how install MPI in VS2010

http://msdn.microsoft.com/en-gb/library/ee441265.aspx#BKMK_debug1

But, when I try compile solution, I get linker errors:

1>main.obj : error LNK2019: unresolved external symbol _MPI_Finalize@0 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _MPI_Barrier@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _MPI_Recv@28 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _MPI_Ssend@24 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _MPI_Comm_size@8 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _MPI_Comm_rank@8 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _MPI_Init@8 referenced in function _main

May be I have to install something else? May be HPC Pack 2008 R2 Service Pack 2?

Upvotes: 1

Views: 2272

Answers (1)

Attila
Attila

Reputation: 28782

Be sure to check out step 3 ("Specify additional properties for the project") under Section "Create a C++ MPI sample project in Visual Studio 2010" in the link you provided

The error is informing you that the linker cannot find the libraries containing the defintiions for the various MPI* functions. The linker settings (Library directories (3c) and Linker->Input (3d)) are the ones that specify for the linker what libraries to use and where to find them

Upvotes: 1

Related Questions