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 member functions also get exported. For
> non-member function, this must also be added. Structs and classes are
> roughly the same in C++ (different initialisation) but unless they include
> functions (not function pointers), the do not need to be exported (you
> don't link to it).
>
> BTW: With gcc >= 4 on linux, you may also want to use
> #define MYLIB_EXPORT __attribute__((visibility("default")))
> and compile with -fvisibility=hidden. That allows to not export symbols for
> internal classes and it's faster at runtime.

faster in terms of?

Leo

-- 
--
Linux User 152692
PGP: 0xF944807E
Catalonia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to