[CMake] Re: cmake question

Bill Hoffman bill.hoffman at kitware.com
Thu Dec 2 12:31:02 EST 2004


The CMake mailing list would be the place to discuss this.
I suppose you have two choices:

1. use an ifdef in A for the declspec stuff.

A IMPORT_EXPORT_MACRO 

Then if you are building something.dll you could build the
sources for A in such a way that IMPORT_EXPORT_MACRO is defined
to nothing, then use the .def file as you have.

2. You should be able to only include the B stuff in the .def file
and use the declspec stuff for the A stuff.

-Bill

At 12:13 PM 12/2/2004, you wrote:
>Hello Bill
>
>I am sorry to have to ask you but I asked a couple of itk people that I
>know and they did not know the answer and since your name is on the
>cmake book I thought to e-mail you,
>
>I am trying to use cmake to build my project and I think it is a great
>tool specifically for people like me who do not know much about windows
>
>so I have say
>two directories A B
>
>in A __declspec(dllexport) is used for all symbols to be exported (I
>have tested this separately and I can build A.dll)
>
>in B there is a .def file
>
>
>so I am trying to create something.dll from A and B I thought in B I
>just create one list of source files from both A and B, add the .def
>file to source and build it but no luck because .Net gives me errors
>saying "definition of dllimport function is not allowed" for almost
>everything that it tries to compile in A,
>
>
>thanks
>
>Leila




More information about the CMake mailing list