summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTransporter <ogre.transporter@gmail.com>2020-04-30 19:25:47 +0200
committerTransporter <ogre.transporter@gmail.com>2020-04-30 19:25:47 +0200
commit53e5e8cb0143736eb69820220a220a72cdd616de (patch)
treefba018e2f6d5405d2996a9896a45e44621cbc0ef /include
parentc378b6fb97a30175e957c8ce0bd8ad7bf5bcbe7f (diff)
Fix issure #138: DLL export fails
Diffstat (limited to 'include')
-rw-r--r--include/tgbot/export.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/tgbot/export.h b/include/tgbot/export.h
index 55789d9..3178a0e 100644
--- a/include/tgbot/export.h
+++ b/include/tgbot/export.h
@@ -2,7 +2,19 @@
#define TGBOT_EXPORT_H
#ifndef TGBOT_API
+#ifdef _MSC_VER
+#ifdef TGBOT_DLL
+#ifdef TgBot_EXPORTS
+#define TGBOT_API __declspec(dllexport)
+#else
+#define TGBOT_API __declspec(dllimport)
+#endif
+#else
+#define TGBOT_API
+#endif
+#else
#define TGBOT_API
#endif
+#endif
#endif //TGBOT_EXPORT_H