[CMake] How to use DEFINE_SYMBOL properly?

Hilton Medeiros medeiros.hilton at gmail.com
Tue Feb 9 07:25:17 EST 2010


Hello,

From what I read and understood this DEFINE_SYMBOL property should be
defined like this (or something like this):

On Windows, as shared library: target_EXPORTS=__declspec(dllexport)
On Linux, as shared library: 
target_EXPORTS=__attribute__((visibility("default")))


So that I can use this symbol like this:

class target_EXPORTS ExampleClass {...};


But on my machine (Linux, gcc) while building a shared library, with
CMake 2.8.0, I'm getting the error below because CMake is defining this
property with -Dtarget_EXPORTS=0:

error: expected identifier before numeric constant

What am I missing?

Kind regards,
Hilton


More information about the CMake mailing list