]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOM_I/GEOM_Gen_i.cc
Salome HOME
SALOME 9.1.0 Windows version
[modules/geom.git] / src / GEOM_I / GEOM_Gen_i.cc
index f6a6ea35610b7b1f7a03b49a4f138afb821441d7..5e729a615c8acf1e8a94367c043748754fe18a99 100644 (file)
@@ -2531,8 +2531,22 @@ void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
 
   // check, if corresponding operations are already created
   if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
+#if WIN32
+  #if UNICODE
+    //RNV: this is workaround for providing compilation,
+    //     path should be processed as unicode string.
+    size_t length = strlen(aPlatformLibName.c_str()) + sizeof(char);
+    wchar_t* aPath = new wchar_t[length + 1];
+    memset(aPath, '\0', length);
+    mbstowcs(aPath, aPlatformLibName.c_str(), length);
+  #else
+    const char* aPath = aPlatformLibName.c_str();
+  #endif
     // load plugin library
-    LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
+    LibHandle libHandle = LoadLib(aPath);
+#else
+    LibHandle libHandle = LoadLib(aPlatformLibName.c_str());
+#endif
     if (!libHandle) {
       // report any error, if occurred
 #ifndef WIN32