]> Creatis software - bbtk.git/commitdiff
#3479 Bug compilation windows dlfcn.h include
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Sun, 12 Dec 2021 10:34:09 +0000 (11:34 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Sun, 12 Dec 2021 10:34:09 +0000 (11:34 +0100)
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkUtilities.cxx

index e91dcfdfc4ef94f15becf5452c0b593db689cdc8..753e912c29374c61d487de0c94e3317923b9a588 100644 (file)
@@ -378,12 +378,12 @@ namespace bbtk
       }
 
     sprintf(copyFile,"copy %s\\bbtk_config.xml.tmp \"%s\"\\bbtk_config.xml ",bbtk_path,rootDirectory );
-
-       WCHAR    rootDirectory2[200];
-       MultiByteToWideChar( 0,0, rootDirectory, 200, rootDirectory2, 6);
-       LPCWSTR rootDirectory3 = rootDirectory2;
-       int attribs = GetFileAttributes (rootDirectory3);
-//    int attribs = GetFileAttributes (rootDirectory3);
+// EED 2021-12-12
+//     WCHAR    rootDirectory2[200];
+//     MultiByteToWideChar( 0,0, rootDirectory, 200, rootDirectory2, 6);
+//     LPCWSTR rootDirectory3 = rootDirectory2;
+//     int attribs = GetFileAttributes (rootDirectory3);
+    int attribs = GetFileAttributes (rootDirectory);
        
        
     bbtkMessage("config",1,std::hex << attribs << " " << FILE_ATTRIBUTE_DIRECTORY << std::endl);
@@ -391,11 +391,12 @@ namespace bbtk
     {
                if ((attribs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY ) /// \TODO : check !
                {       
-                       WCHAR    configPath2[200];
-                       MultiByteToWideChar( 0,0, configPath, 200, configPath2, 6);
-                       LPCWSTR configPath3 = configPath2;
-                       if ( GetFileAttributes( configPath3 ) == 0xFFFFFFFF)
-                       //if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
+// EED 2021-12-12
+//                     WCHAR    configPath2[200];
+//                     MultiByteToWideChar( 0,0, configPath, 200, configPath2, 6);
+//                     LPCWSTR configPath3 = configPath2;
+//                     if ( GetFileAttributes( configPath3 ) == 0xFFFFFFFF)
+                       if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
                        {
                                system(copyFile);
                        }
index c7cce8103712581dc28b29f8e712352fd1266dac..85323d4b1451f65a7e6de58cef1c75f3af6459ee 100644 (file)
@@ -671,10 +671,11 @@ void wtoc(const WCHAR* Source,CHAR* Dest)
 #ifdef WIN32
 
 //2018-07-06 mingw64
-    wchar_t pname2[512];
-    long result = GetModuleFileName(NULL, pname2, pathsize);
-       crea::System::wtoc(pname2,pname);
-//    long result = GetModuleFileName(NULL, pname, pathsize);
+//2021-12-12 
+//    wchar_t pname2[512];
+//    long result = GetModuleFileName(NULL, pname2, pathsize);
+//     crea::System::wtoc(pname2,pname);
+    long result = GetModuleFileName(NULL, pname, pathsize);
     if (result > 0)
       {
        /* fix up the dir slashes... */