Hi Gerhard,

Thanks that solved my problem. 

 

Best regards, Cees

 

________________________________

From: Gerhard Grimm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 25, 2007 9:59 AM
To: Cees Wesseling; [email protected]
Subject: AW: [CMake] how to use CMAKE_LINK_DEF_FILE_FLAG

 

Hi Cees,

 

simply add the .def file to your sources in the ADD_LIBRARY command:

 

ADD_LIBRARY(Test SHARED InProcServer.cc dll.def)

 

Worked for me in a similar case.

 

Best regards, Gerhard

        -----Ursprüngliche Nachricht-----
        Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Cees 
Wesseling
        Gesendet: Donnerstag, 25. Oktober 2007 18:36
        An: [email protected]
        Betreff: [CMake] how to use CMAKE_LINK_DEF_FILE_FLAG

        I am trying to build a C++ Windows dll that must use a linker 
definition file with the exports using cmake version 2.4-patch 7 for Visual 
Studio 2005 in nmake Makefile mode.

         

        What I have tried is the following bare CMakeLists.txt:

         

        SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:dll.def")

        ADD_LIBRARY(Test

          SHARED

          InProcServer.cc

        )

         

        The dll builds fine, but has no entry points. In the resulting Makefile 
I do not find any mentioning of the DEF linker flag. And from inspecting 
Modules/Platform/Windows-cl.cmake of the cmake distro I am getting suspicious 
if the CMAKE_LINK_DEF_FILE_FLAG is ever rolled into the link options.

         

        Am I overlooking something obvious? Is there another way to push this 
flag into the link options?

         

        Thanks, Cees

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to