Shiqing,

 

I created new projects from scratch using CMake 2.6.4, selected the
source dir and target dir and chose Visual Studio 8 2005 Win64. Pressed
configure twice to accept all the default setting and then generate.
When I open the Visual Studio project file for ompi_info
(ompi\tools\ompi_info\ompi_info.vcproj) in a text editor there are
multiple copies of the following line:

 

PreprocessorDefinitions="WIN32,_WINDOWS,_DEBUG,_USRDLL,OPAL_IMPORTS,OMPI
_IMPORTS,ORTE_IMPORTS,"OMPI_CONFIGURE_DATE=\"07:54 AM Mon
04/19/2010 \"","OMPI_BUILD_DATE=\"07:54 AM Mon
04/19/2010 \"",CMAKE_INTDIR=\"Debug\""

 

Opening the project in Visual Studio and going to properties,
configuration options, C/C++, Preprocessor, the processor defitions
string contains:

 

WIN32

_WINDOWS

_DEBUG

_USRDLL

OPAL_IMPORTS

OMPI_IMPORTS

ORTE_IMPORTS

"OMPI_CONFIGURE_DATE=\"07:54 AM Mon 04/19/2010 \""

"OMPI_BUILD_DATE=\"07:54 AM Mon 04/19/2010 \""

CMAKE_INTDIR=\"Debug\"

 

-Ben

 

 

From: Shiqing Fan [mailto:f...@hlrs.de] 
Sent: Friday, April 16, 2010 10:59 AM
To: Open MPI Users
Cc: Kuppers, Ben SIEP-PTT/SDRM
Subject: Re: [OMPI users] import/export issues on Windows

 

Hi Ben,





I believe changing OMPI_DECLSPEC to __declspec(dllexport) inside
functions.h will allow the cxx module to build (and export the function)
but will break any client using (and thus trying to import) it.
OMPI_DECLSPEC should only be defined as __declspec(dllexport) while
compiling the cxx module (say when libmpi_cxx_EXPORTS is defined).

Yes, as long as there are more functions to export, they have to be
defined in that way. I don't see any option for Intel Compiler to manage
this automatically.




BTW, I also noticed that the Intel compiler has issues with the
preprocessor definitions for ompi_info "OMPI_CONFIGURE_DATE=\"03:18 PM
Wed 04/14/2010 \"" and

"OMPI_BUILD_DATE=\"03:18 PM Wed 04/14/2010 \"". The quotes around the
definitions throw it off completely. Is that something that CMake does
or do you instruct CMake to do this? Both the Intel and Microsoft
compiler work correctly without them.

In which project did you see those preprocessor definitions? Because for
me, I don't see them. Actually, they are not used as preprocessors in
the whole solution, but they are only some cached variables in CMake.
Could you please try to do a clean configuration with CMake, and see if
they still exists? 


Thanks,
Shiqing




Thanks,

Ben

Reply via email to