dll_visibility.h 420 B

1234567891011121314151617181920
  1. #ifndef DLL_PUBLIC
  2. #if defined _WIN32
  3. #ifdef __GNUC__
  4. #define DLL_PUBLIC __attribute__ ((dllexport))
  5. #else
  6. #define DLL_PUBLIC __declspec(dllexport)
  7. #endif
  8. #define DLL_LOCAL
  9. #else
  10. #if __GNUC__ >= 4
  11. #define DLL_PUBLIC __attribute__ ((visibility ("default")))
  12. #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
  13. #else
  14. #define DLL_PUBLIC
  15. #define DLL_LOCAL
  16. #endif
  17. #endif
  18. #endif