First page Back Continue Last page Overview Graphics
Performance: Linking
The new visibility attribute
- #define DLLEXPORT __attribute__ ((visibility(“default”))
- #define DLLLOCAL __attribute__ ((visibility(“hidden”))
- class Visible {
- private:
- virtual void AvirtualMethod();
- public:
- DLLLOCAL void InternalToThisLibraryMethod();
- DLLEXPORT void PublicMethod();
- };
Compile with -fvisibility=hidden
- Compatible with MS's __declspec(dllexport/import)
- Provides extra in-source semantic information
- Extensive markup work underway in OO.o in India
- Major wins possible; cf. Caveats throw, typeid etc.