[CMake] Linking Error with Visual Studio 2013 x64

John Drescher drescherjm at gmail.com
Thu Apr 17 10:49:15 EDT 2014


>>>> Is there some option to export automatically some methods without using
>>>> __declspec(dllexport)?
>>
>> No. There are workarounds like in
>> http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll
>> but it's too much work.
>> Basically you want to define a macro that resolves to
>> __declspec(dllexport) when building the DLL and to nothing when only using
>> libraries headers.
>

CMake module GenerateExportHeader can help a little with this.

John


More information about the CMake mailing list