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
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
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
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,
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
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,
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: