I found the following #define artifact on
http://gcc.gnu.org/wiki/Visibility.
This suggests that while the Microsoft standard requires an
using/building concept, but gcc doesn't.
However, I've found an email on this newsgroup that suggests that the
"using" code should see a macro that is empty, not "__attribute__
((visibility("hidden")))".
Which is correct?
#ifdef _MSC_VER
#ifdef BUILDING_DLL
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#define DLLLOCAL
#else
#ifdef HAVE_GCCVISIBILITYPATCH
#define DLLEXPORT __attribute__ ((visibility("default")))
#define DLLLOCAL __attribute__ ((visibility("hidden")))
#else
#define DLLEXPORT
#define DLLLOCAL
#endif
#endif