update shit
This commit is contained in:
1 parent
9f5f27353f
commit
b8da0a802e
27 files changed
+1018
-87
No files matched your search
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
// https://stackoverflow.com/questions/2164827/explicitly-exporting-shared-library-functions-in-linux
|
||||
// generate import export macro
|
||||
#if defined(_MSC_VER)
|
||||
// Microsoft
|
||||
#define LIBCMO_RAW_EXPORT __declspec(dllexport)
|
||||
#define LIBCMO_RAW_IMPORT __declspec(dllimport)
|
||||
#elif defined(__GNUC__)
|
||||
// GCC
|
||||
#define LIBCMO_RAW_EXPORT __attribute__((visibility("default")))
|
||||
#define LIBCMO_RAW_IMPORT
|
||||
#elif defined(__clang__)
|
||||
// GCC
|
||||
#define LIBCMO_RAW_EXPORT __attribute__((visibility("default")))
|
||||
#define LIBCMO_RAW_IMPORT
|
||||
#else
|
||||
// do nothing and hope for the best?
|
||||
#define LIBCMO_RAW_EXPORT
|
||||
#define LIBCMO_RAW_IMPORT
|
||||
#pragma warning Unknown dynamic link import/export semantics.
|
||||
#endif
|
||||
|
||||
// choosee proper style
|
||||
#if defined(LIBCMO_EXPORTING)
|
||||
#define LIBCMO_NAKED_EXPORT LIBCMO_RAW_EXPORT
|
||||
#else
|
||||
#define LIBCMO_NAKED_EXPORT LIBCMO_RAW_IMPORT
|
||||
#endif
|
||||
|
||||
// some work for cpp
|
||||
#if defined(__cplusplus)
|
||||
#define LIBCMO_EXPORT extern "C" LIBCMO_NAKED_EXPORT
|
||||
#else
|
||||
#define LIBCMO_EXPORT LIBCMO_NAKED_EXPORT
|
||||
#endif
|
||||
Reference in new issue
Block a user