dll.h 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  2. #define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  3. #if defined(_MSC_VER) || \
  4. (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
  5. (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
  6. #pragma once
  7. #endif
  8. // The following ifdef block is the standard way of creating macros which make
  9. // exporting from a DLL simpler. All files within this DLL are compiled with the
  10. // yaml_cpp_EXPORTS symbol defined on the command line. This symbol should not
  11. // be defined on any project that uses this DLL. This way any other project
  12. // whose source files include this file see YAML_CPP_API functions as being
  13. // imported from a DLL, whereas this DLL sees symbols defined with this macro as
  14. // being exported.
  15. #undef YAML_CPP_API
  16. #ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined
  17. // manually)
  18. #ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake
  19. // or defined manually)
  20. // #pragma message( "Defining YAML_CPP_API for DLL export" )
  21. #define YAML_CPP_API __declspec(dllexport)
  22. #else // yaml_cpp_EXPORTS
  23. // #pragma message( "Defining YAML_CPP_API for DLL import" )
  24. #define YAML_CPP_API __declspec(dllimport)
  25. #endif // yaml_cpp_EXPORTS
  26. #else // YAML_CPP_DLL
  27. #define YAML_CPP_API
  28. #endif // YAML_CPP_DLL
  29. #endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66