Skip to content

Instantly share code, notes, and snippets.

@xforce
Created January 14, 2017 17:48
Show Gist options
  • Save xforce/2dc98e9b23bcf0e3da2971338f045d47 to your computer and use it in GitHub Desktop.
Save xforce/2dc98e9b23bcf0e3da2971338f045d47 to your computer and use it in GitHub Desktop.
microprofile dll patch
diff --git a/microprofile.cpp b/microprofile.cpp
index 563ec8c..5da52f1 100644
--- a/microprofile.cpp
+++ b/microprofile.cpp
@@ -1,4 +1,11 @@
#define MICROPROFILE_IMPL
+
+#if _WIN32
+ #ifndef MICROPROFILE_API
+ #define MICROPROFILE_API __declspec(dllexport)
+ #endif
+#endif
+
#include "microprofile.h"
#if MICROPROFILE_ENABLED
diff --git a/microprofile.h b/microprofile.h
index 44008ce..b9dd838 100644
--- a/microprofile.h
+++ b/microprofile.h
@@ -152,6 +152,14 @@ typedef uint16_t MicroProfileGroupId;
#include <stdint.h>
+
+
+#ifdef _WIN32
+#ifndef MICROPROFILE_API
+#define MICROPROFILE_API __declspec(dllimport)
+#endif
+#endif
+
#ifndef MICROPROFILE_API
#define MICROPROFILE_API
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment