changeset 228:0f9d183f685d

fix compilation with Holy Build Box (for LSB)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Mar 2020 14:03:23 +0100
parents e4def26f0fd3
children 967ae255a58f
files Plugin/Plugin.cpp
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Fri Mar 13 12:38:45 2020 +0100
+++ b/Plugin/Plugin.cpp	Fri Mar 13 14:03:23 2020 +0100
@@ -36,6 +36,25 @@
 #include <boost/filesystem.hpp>
 
 
+/**
+ * We force the redefinition of the "ORTHANC_PLUGINS_API" macro, that
+ * was left empty with gcc until Orthanc SDK 1.5.7 (no "default"
+ * visibility). This causes the version script, if run from "Holy
+ * Build Box", to make private the 4 global functions of the plugin.
+ **/
+
+#undef ORTHANC_PLUGINS_API
+
+#ifdef WIN32
+#  define ORTHANC_PLUGINS_API __declspec(dllexport)
+#elif __GNUC__ >= 4
+#  define ORTHANC_PLUGINS_API __attribute__ ((visibility ("default")))
+#else
+#  define ORTHANC_PLUGINS_API
+#endif
+
+
+
 static OrthancPluginContext* context_ = NULL;
 static bool restrictTransferSyntaxes_ = false;
 static std::set<std::string> enabledTransferSyntaxes_;