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)
// 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)