# HG changeset patch # User Sebastien Jodogne # Date 1584104603 -3600 # Node ID 0f9d183f685d8ebf6a82bc57667c63dc1ade90f7 # Parent e4def26f0fd33bd8456ff2f0bcfc2a597bb17ead fix compilation with Holy Build Box (for LSB) diff -r e4def26f0fd3 -r 0f9d183f685d Plugin/Plugin.cpp --- 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 +/** + * 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 enabledTransferSyntaxes_;