[CMake] Weird DLL_EXPORT disables creation of .lib-files with Visual C++ .NET 2003

wedekind wedekind at caesar.de
Wed Jun 29 09:39:03 EDT 2005


Hello all,

I have created a CMakeLists.txt for a Visual C++ .NET 2003 project, I am
using Cmake 2.0.6. My problem is, that the resulting vcproj-file does not
create a .lib-file for the project, just the .dll-file is created. In order
to link the created dll with my other projects I need the lib-file. No it
gets weird... If I change a preprocessor definition from JCore_EXPORTS to
JCORE_DLL_EXPORT (note the change in case too) it creates the lib file. But
I doubt that changing this preprocessor definition alone is the solution
because I also have (very similar) projects that create lib-files without
this *_DLL_EXPORT-definition, they only have the cmake-created
*_EXPORTS-definition (without DLL in it)!

The second aspect of this problem is: I cannot just add the "missing"
definition, because that would mean to manually interfere with cmakes
vcproj-creation procedure. Cmake already creates an EXPORT(S)-definition, it
just does not work every time (?)... And if the cmake-created definition
precedes my own the lib-file will not be generated too.

Do you know the root of the problem described? Is this just a symptom that I
have seen in this DLL_EXPORT-stuff?

Thanks

Marco




More information about the CMake mailing list