Visibility
From K-3D
Overview
The following is a good description of the GCC mechanism for controlling symbol visibility - similar to declspec(dllexport) and declspec(dllimport) for those familiar with MSVC:
- http://gcc.gnu.org/wiki/Visibility
- http://developer.apple.com/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html
Unfortunately, using these features is problematic due to our dependence on dynamic_cast/type_info:
- http://lists.boost.org/boost-build/2005/08/11054.php
- http://www.dribin.org/dave/blog/archives/2006/02/
Apple appears to have a feature in their version of gcc that does exactly what we need:
It appears to have been adopted for future versions of mainstream gcc:
- http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01868.html
- http://gcc.gnu.org/ml/gcc-patches/2007-06/msg02063.html
Here is an interesting alternative based on "Export Maps" - comparable to .DEF files for those familiar with MSVC:
Thinking wayyyyyyy outside the box, we might want to consider ditching dynamic_cast for some other form of RTTI, if we ever want to support distributed-memory architectures. Hate to say it, but we may have come full-circle back to COM or something similar ;)