]> Creatis software - bbtkGEditor.git/commitdiff
#3210 bbGEditor Feature New Normal - branch vtk7itk4wx3-mingw
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 27 Jul 2018 15:30:51 +0000 (17:30 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 27 Jul 2018 15:30:51 +0000 (17:30 +0200)
appli/bbEditor/CMakeLists.txt
appli/bbEditor/bbEditor.cxx

index e39f45dcbbef8574660043a55460ec14fdeba16c..e5b10e07cd06dd4f086d641b98a0f89ce7bbe67b 100644 (file)
@@ -40,7 +40,11 @@ INCLUDE_DIRECTORIES(../../data/icons)
 
 IF(BBTK_USE_WXWIDGETS AND WIN32)
   ADD_EXECUTABLE(bbEditor WIN32 ${SOURCES})  
-  SET_TARGET_PROPERTIES(bbEditor PROPERTIES LINK_FLAGS /subsystem:console )
+  IF(MINGW)
+       SET_TARGET_PROPERTIES(bbEditor PROPERTIES LINK_FLAGS  -mconsole )
+  ELSE(MINGW)
+       SET_TARGET_PROPERTIES(bbEditor PROPERTIES LINK_FLAGS /subsystem:console )
+  ENDIF(MINGW)  
 ELSE(BBTK_USE_WXWIDGETS AND WIN32)
   ADD_EXECUTABLE(bbEditor MACOSX_BUNDLE ${SOURCES}  )  
 ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
index a12bae411a5cc06ab59ae0b07c6943ed81b9009f..8b3ee65c883da77341d6e8fd7ccb7688f6322f5d 100644 (file)
@@ -184,7 +184,10 @@ bool wxBBEditorApp::OnInit( )
 //  you need to use the linker option "/subsystem:console" and the following code:
 int main(int argc, char* argv[])
 {
-       return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
+       char buffer[500];
+       wcstombs(buffer, ::GetCommandLine(), 500);
+       return WinMain(::GetModuleHandle(NULL), NULL, buffer, SW_SHOWNORMAL);
+//     return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
 }
 
 #endif // defined(_WIN32)