From 0b36569261590ee1d2e595b7318e0ddca929ac3a Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 27 Jul 2018 17:30:51 +0200 Subject: [PATCH] #3210 bbGEditor Feature New Normal - branch vtk7itk4wx3-mingw --- appli/bbEditor/CMakeLists.txt | 6 +++++- appli/bbEditor/bbEditor.cxx | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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) -- 2.47.1