From: Eduardo DAVILA Date: Fri, 27 Jul 2018 15:24:42 +0000 (+0200) Subject: #3206 creaContours Feature New Normal branch vtk7itk4wx3-mingw X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=refs%2Fheads%2Fvtk7itk4wx3-mingw64;p=creaContours.git #3206 creaContours Feature New Normal branch vtk7itk4wx3-mingw --- diff --git a/appli/wxContourGUIExample/CMakeLists.txt b/appli/wxContourGUIExample/CMakeLists.txt index 755e18b..8820fed 100644 --- a/appli/wxContourGUIExample/CMakeLists.txt +++ b/appli/wxContourGUIExample/CMakeLists.txt @@ -27,7 +27,14 @@ IF(WIN32) #MESSAGE("WIN32") ADD_EXECUTABLE(creaContourApp WIN32 wxContourGUIExample.cxx) - SET_TARGET_PROPERTIES(creaContourApp PROPERTIES LINK_FLAGS /subsystem:console ) + + IF(MINGW) + SET_TARGET_PROPERTIES(creaContourApp PROPERTIES LINK_FLAGS -mconsole ) + ELSE(MINGW) + SET_TARGET_PROPERTIES(creaContourApp PROPERTIES LINK_FLAGS /subsystem:console ) + ENDIF(MINGW) + + ELSE(WIN32) ADD_EXECUTABLE(creaContourApp MACOSX_BUNDLE wxContourGUIExample) ENDIF(WIN32) diff --git a/appli/wxContourGUIExample/wxContourGUIExample.cxx b/appli/wxContourGUIExample/wxContourGUIExample.cxx index 72c9130..4c3a296 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.cxx +++ b/appli/wxContourGUIExample/wxContourGUIExample.cxx @@ -147,9 +147,11 @@ bool wxTheApplication::OnInit() #if(WIN32) 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); } #else #endif