publicExport.h 545 B

1234567891011121314151617181920212223
  1. #ifndef _OTHER_PUBLICFUNC_HEADER_
  2. #define _OTHER_PUBLICFUNC_HEADER_
  3. #pragma once
  4. #ifdef _WIN32
  5. #ifdef PUBLIC_EXPORTS
  6. #ifndef PUBLIC_API
  7. #define PUBLIC_API __declspec(dllexport)
  8. #endif
  9. #else
  10. #ifndef PUBLIC_API
  11. #define PUBLIC_API __declspec(dllimport)
  12. #endif
  13. #endif
  14. #else
  15. #if ( defined(__GNUC__) && __GNUC__ >= 4 )
  16. #define PUBLIC_API __attribute__((visibility("default")))
  17. #else
  18. #define PUBLIC_API
  19. #endif
  20. #endif
  21. #endif //_OTHER_PUBLICFUNC_HEADER_