# HG changeset patch # User Sebastien Jodogne # Date 1593681314 -7200 # Node ID 2af772742d0b9f5117cead82ee8411425e33ce1f # Parent eb09eb1251b95b57e8ee00bfdbd1c99c46740b0a fix export of symbols in holy-build-box diff -r eb09eb1251b9 -r 2af772742d0b Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Wed Jul 01 16:46:13 2020 +0200 +++ b/Plugin/Plugin.cpp Thu Jul 02 11:15:14 2020 +0200 @@ -126,6 +126,24 @@ +/** + * 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 + + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context)