I took off the OMPI_IMPORTS actually and it now compiles correctly. Maybe those are to be defined if I had built shared lib version of mpi libs.




From: Shiqing Fan [mailto:fan@hlrs.de]
Sent: 19 November 2011 04:45
To: Open MPI Users
Cc: MM
Subject: Re: [OMPI users] vs2010: MPI_Address() unresolved


Does this happen also for other MPI_* functions? Probably you need to add OMPI_IMPORTS as an extra preprocessor.


On 2011-11-19 1:02 AM, MM wrote:



I get this style of errors when trying to link against libmpid.lib  (compiled with instructions from README.Windows part 1 cmake):

mylib.lib(myfile.obj): : error LNK2001: unresolved external symbol __imp__MPI_Address


I set BUILD_SHARED_LIBS to false, so I generate static libs. I've also checked that the /MDd is set and indeed libmpid.lib are built against the DLL version of the C++ runtime when I open the solution in vs2010.


I myself link my application against the /MDd as well.


I don't know why it's looking for __impl__MPI_Address  (__impl__ is a prefix related to DLLs somehow).

I gather this MPI_Address() function resides in libmpi.lib and libmpid.lib


PS: I didn't have these link errors when I built against the prebuilt win libraries from the website, what are the CMAke flags for those?




users mailing list

Shiqing Fan
High Performance Computing Center Stuttgart (HLRS)
Tel: ++49(0)711-685-87234      Nobelstrasse 19
Fax: ++49(0)711-685-65832      70569 Stuttgart
email: fan@hlrs.de