From: Eduardo DAVILA Date: Fri, 27 Jul 2018 15:30:51 +0000 (+0200) Subject: #3210 bbGEditor Feature New Normal - branch vtk7itk4wx3-mingw X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0b36569261590ee1d2e595b7318e0ddca929ac3a;p=bbtkGEditor.git #3210 bbGEditor Feature New Normal - branch vtk7itk4wx3-mingw --- diff --git a/appli/bbEditor/CMakeLists.txt b/appli/bbEditor/CMakeLists.txt index e39f45d..e5b10e0 100644 --- a/appli/bbEditor/CMakeLists.txt +++ b/appli/bbEditor/CMakeLists.txt @@ -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) diff --git a/appli/bbEditor/bbEditor.cxx b/appli/bbEditor/bbEditor.cxx index a12bae4..8b3ee65 100644 --- a/appli/bbEditor/bbEditor.cxx +++ b/appli/bbEditor/bbEditor.cxx @@ -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)