"Yuri V. Timenkov" <[EMAIL PROTECTED]> wrote on 08/19/2008 02:05:04 PM:
> Are following posts solve your problem? > > http://www.cmake.org/pipermail/cmake/2008-July/023099.html > http://www.cmake.org/pipermail/cmake/2006-September/011100.html > http://www.cmake.org/pipermail/cmake/2005-February/006080.html Yes they do. The tricky point was having to know that the symbol ${LIBRARYNAME}_EXPORTS is set when building the library. Then adding something along these lines in the header file solves the problem: #ifdef _WIN32 # ifdef testc2_EXPORTS # define WHATEVER __declspec( dllexport ) # else # define WHATEVER __declspec( dllimport ) # endif #else # define WHATEVER #endif WHATEVER float LibC2Func(); So now I can get a simple project with one dll and one exe to compile, but I still do not understand which program determines whether the .exe should link to a .lib or a .dll. Does the Microsoft Visual Studio compiler determine this or does CMake inspect the header files? I find it strange that the linking command depends on the contents of the header files. Is there a reason for this? Cheers, Jos Jos van den Oever - SW Engineering PANalytical Lelyweg 1 7602 EA Almelo The Netherlands T +31 (0)546 528 F +31 (0)546 534598 [EMAIL PROTECTED] www.PANalytical.com PANalytical The Analytical X-ray Company The information contained in this message is confidential and may be legally privileged. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
