summaryrefslogtreecommitdiff
path: root/cpp/src/tests/shlibtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests/shlibtest.cpp')
-rw-r--r--cpp/src/tests/shlibtest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/tests/shlibtest.cpp b/cpp/src/tests/shlibtest.cpp
index 80320ea7be..e485cc9397 100644
--- a/cpp/src/tests/shlibtest.cpp
+++ b/cpp/src/tests/shlibtest.cpp
@@ -19,7 +19,11 @@
*/
int* loaderData = 0;
-extern "C" void callMe(int *i) { loaderData=i; }
+extern "C"
+#ifdef WIN32
+__declspec(dllexport)
+#endif
+void callMe(int *i) { loaderData=i; }
struct OnUnload { ~OnUnload() { *loaderData=42; } };
OnUnload unloader; // For destructor.