[CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Leopold Palomo Avellaneda
Hi, I'm a Linux user and I'm uncomfortable in the windows environment. In Linux, I can create a C++ library with cmake without any problem. The so version and the .a (static version). But, my question is about windows. If I have a shared library that works in Linux, may I have to do something

Re: [CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Mike Jackson
Well, basically, Cmake will _help_ you create your library BUT there is some work that you need to add to your project. Say your library is named mylib and Your project name is MyLib. When you do Add_library(MyLib SHARED ${Sources}) cmake will automatically add a definition MyLib_EXPORT to

Re: [CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Leopold Palomo Avellaneda
Mike, yes it helps, and a lot Now, in the class declaration for each of your classes add the definition: I understand that you have to add: class MYLIB_EXPORT MyClass for all the classes, but also for the structs , and functions? Leo A Dissabte 02 Agost 2008, Mike Jackson va

Re: [CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Hendrik Sattler
Am Samstag, 2. August 2008 00:41:11 schrieb Leopold Palomo Avellaneda: I understand that you have to add: class MYLIB_EXPORT MyClass for all the classes, but also for the structs , and functions? If a class is exported, its member functions also get exported. For non-member function,

Re: [CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Leopold Palomo Avellaneda
A Dissabte 02 Agost 2008, Hendrik Sattler va escriure: Am Samstag, 2. August 2008 00:41:11 schrieb Leopold Palomo Avellaneda: I understand that you have to add: class MYLIB_EXPORT MyClass for all the classes, but also for the structs , and functions? If a class is exported, its

Re: [CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Hendrik Sattler
Am Samstag, 2. August 2008 01:21:01 schrieb Leopold Palomo Avellaneda: A Dissabte 02 Agost 2008, Hendrik Sattler va escriure: Am Samstag, 2. August 2008 00:41:11 schrieb Leopold Palomo Avellaneda: I understand that you have to add: class MYLIB_EXPORT MyClass for all the classes,

Re: [CMake] Creating libraries (DLL) in windows

2008-08-01 Thread Leopold Palomo Avellaneda
A Dissabte 02 Agost 2008, Hendrik Sattler va escriure: Am Samstag, 2. August 2008 01:21:01 schrieb Leopold Palomo Avellaneda: A Dissabte 02 Agost 2008, Hendrik Sattler va escriure: Am Samstag, 2. August 2008 00:41:11 schrieb Leopold Palomo Avellaneda: I understand that you have to add: