summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEgor Pugin <egor.pugin@gmail.com>2020-05-02 02:16:27 +0300
committerGitHub <noreply@github.com>2020-05-02 02:16:27 +0300
commit6436825328cd3bf4a1c964bc84638bc93cfaff1e (patch)
treecd933546a1bfc38e44c9487c2c4327ed569673bd /include
parentc378b6fb97a30175e957c8ce0bd8ad7bf5bcbe7f (diff)
parent3b7da8cd1e2f77d73cc19533fc657ba10a80c8cd (diff)
Merge pull request #139 from OgreTransporter/master
Various fixes
Diffstat (limited to 'include')
-rw-r--r--include/tgbot/export.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/tgbot/export.h b/include/tgbot/export.h
index 55789d9..1bfb503 100644
--- a/include/tgbot/export.h
+++ b/include/tgbot/export.h
@@ -2,7 +2,27 @@
#define TGBOT_EXPORT_H
#ifndef TGBOT_API
-#define TGBOT_API
+ #ifdef TGBOT_DLL
+ #if defined _WIN32 || defined __CYGWIN__
+ #define TGBOT_HELPER_DLL_EXPORT __declspec(dllexport)
+ #define TGBOT_HELPER_DLL_IMPORT __declspec(dllimport)
+ #else
+ #if __GNUC__ >= 4
+ #define TGBOT_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
+ #define TGBOT_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
+ #else
+ #define TGBOT_HELPER_DLL_EXPORT
+ #define TGBOT_HELPER_DLL_IMPORT
+ #endif
+ #endif
+ #ifdef TgBot_EXPORTS
+ #define TGBOT_API TGBOT_HELPER_DLL_EXPORT
+ #else
+ #define TGBOT_API TGBOT_HELPER_DLL_IMPORT
+ #endif
+ #else
+ #define TGBOT_API
+ #endif
#endif
#endif //TGBOT_EXPORT_H