demo.h 616 B

1234567891011121314151617181920212223
  1. #ifndef CMB_DEV_DEMO_LIBRARY_H__
  2. #define CMB_DEV_DEMO_LIBRARY_H__
  3. #ifdef _WIN32
  4. #ifdef DEMO_LIBRARY_EXPORTS
  5. #define DEMO_LIBRARY_API _declspec(dllexport)
  6. #else
  7. #define DEMO_LIBRARY_API _declspec(dllimport)
  8. #endif
  9. #elif defined(DEMO_LIBRARY_EXPORTS) && defined(__GNUC__)
  10. #if __GNUC__ >= 4
  11. #define DEMO_LIBRARY_API __attribute__((visibility("default")))
  12. #else
  13. #define DEMO_LIBRARY_API
  14. #endif // __GUNC__ >= 4
  15. #else //_WIN32
  16. #define DEMO_LIBRARY_API
  17. #endif //_WIN32
  18. extern "C" DEMO_LIBRARY_API const char* HelloDemo();
  19. #endif //CMB_DEV_DEMO_LIBRARY_H__