From e367e213f92ca2249fc7eae663feb2c30c5b31ab Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 27 Jul 2018 17:24:42 +0200 Subject: [PATCH] #3206 creaContours Feature New Normal branch vtk7itk4wx3-mingw --- appli/wxContourGUIExample/CMakeLists.txt | 9 ++++++++- appli/wxContourGUIExample/wxContourGUIExample.cxx | 8 +++++--- 2 files changed, 13 insertions(+), 4 deletions(-) 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 -- 2.45.1