c++ - Class declarations -
so i'm looking @ ogre character sample, , there's class declared as
class _ogresampleclassexport sample_character : public sdksample
the classes identifier sample_character , derived sdksample class. _ogresampleclassexport though?
on windows platforms _ogresampleclassexport
macro used specify dll linkage of class' members. if macro expands __declspec(dllimport)
members exist in external dll , must imported. if expands __declspec(dllexport)
members exist in dll being built , exported. if macro blank members linked statically , not exit in dll.
on other platforms works in same way. on linux when compiling gcc macro expands __attribute__ ((visibility("???")))
"???" specifies linkage in similar fashion used in __declspec()
.
Comments
Post a Comment