X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_HypothesesUtils.cxx;h=def3ff5572faf09584510e225003f46769ff9aa5;hb=97889f80acb2a7e5d7c9aaa2b6c6b2557014b49d;hp=33baabf0beee9064dcdf6ed4cc1939b0f95a32de;hpb=a1920ff31054e2c882bd94d4f3c04abe53980ce0;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 33baabf0b..def3ff557 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -63,16 +63,20 @@ #endif #ifdef WIN32 -#define LibHandle HMODULE -#define LoadLib( name ) LoadLibrary( name ) -#define GetProc GetProcAddress -#define UnLoadLib( handle ) FreeLibrary( handle ); -#else -#define LibHandle void* -#define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL ) -#define GetProc dlsym -#define UnLoadLib( handle ) dlclose( handle ); -#endif + #define LibHandle HMODULE + #define LoadLib( name ) LoadLibrary( name ) + #define GetProc GetProcAddress + #define UnLoadLib( handle ) FreeLibrary( handle ); +#else // WIN32 + #define LibHandle void* + #ifdef DYNLOAD_LOCAL + #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_LOCAL ) + #else // DYNLOAD_LOCAL + #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL ) + #endif // DYNLOAD_LOCAL + #define GetProc dlsym + #define UnLoadLib( handle ) dlclose( handle ); +#endif // WIN32 #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -519,7 +523,7 @@ namespace SMESH if(MYDEBUG) MESSAGE("Loading client meshers plugin library ..."); LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() ); if (!libHandle) { - // report any error, if occured + // report any error, if occurred { #ifdef WIN32 const char* anError = "Can't load client meshers plugin library";