From: Christian P. <cp...@se...> - 2005-01-21 14:46:13
|
Hi List ! I've added the class export-macros to the tree. The export-macros are needed for the compiler/linker to know which classes should be exported to the client-applications. M$ compilers requires it, and gcc 4 will support it aswell. Advantages: - Smaller shared libraries - Clients cannot access private (that is, not exported) classes/methods For this to work we have to add the export-macros to the class and global method definitions. Friends must also be explicitly exported. Keep in mind that template classes which are not fully specialized must not be exported, cause the code does not reside in the shared library, instead it is emitted on usage. example: original code: -- class Date { public: void mymethod(); friend void myfriend(); }; -- code with export macros: -- class PCORE_EXPORT Date { public: void mymethod(); friend PCORE_EXPORT void myfriend(); }; -- Each module has its own export-macro residing in "include/pclasses/Export.h". Please add the export-macros to the code you've already written ! Greetings, Christian |