2017-08-06 07:20:28 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace my_object {
|
|
|
|
|
|
|
|
#if defined _MSC_VER
|
2017-08-07 00:20:32 +08:00
|
|
|
#define MY_OBJECT_VC
|
2017-08-06 07:20:28 +08:00
|
|
|
#elif defined __GNUC__
|
2017-08-07 00:20:32 +08:00
|
|
|
#define MY_OBJECT_GCC
|
2017-08-06 07:20:28 +08:00
|
|
|
#elif defined __clang__
|
2017-08-07 00:20:32 +08:00
|
|
|
#define MY_OBJECT_CLANG
|
2017-08-06 07:20:28 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined MY_OBJECT_VC
|
2017-08-07 00:20:32 +08:00
|
|
|
#if defined MY_OBJECT_DLL
|
|
|
|
#if defined MY_OBJECT_BUILD
|
|
|
|
#define MY_OBJECT_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define MY_OBJECT_API __declspec(dllexport)
|
|
|
|
#endif // MY_OBJECT_BUILD - Building the Library vs. Using the Library
|
|
|
|
#else
|
|
|
|
#define MY_OBJECT_API
|
|
|
|
#endif // Building a DLL vs. Static Library
|
|
|
|
#else // g++ / clang++
|
|
|
|
#define MY_OBJECT_API __attribute__ ((visibility ("default")))
|
|
|
|
#endif // MY_OBJECT_BUILD
|
2017-08-06 07:20:28 +08:00
|
|
|
|
2017-08-07 00:20:32 +08:00
|
|
|
} // namespace my_object
|