You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.5 KiB

  1. diff --git a/include/wx/app.h b/include/wx/app.h
  2. index 9a73469570..89c1762dc7 100644
  3. --- a/include/wx/app.h
  4. +++ b/include/wx/app.h
  5. @@ -798,6 +798,19 @@ public:
  6. \
  7. return wxEntry(argc, argv); \
  8. }
  9. +#elif wxUSE_UNICODE && ( defined(__MINGW32__) || defined(__MINGW64__) )
  10. + #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
  11. + int main(int argc, char **argv) \
  12. + { \
  13. + wxDISABLE_DEBUG_SUPPORT(); \
  14. + \
  15. + LPWSTR cmdline = ::GetCommandLineW(); \
  16. + int argcw; \
  17. + LPWSTR* argvw = ::CommandLineToArgvW( cmdline, &argcw ); \
  18. + int result = wxEntry( argcw, argvw ); \
  19. + ::LocalFree( argvw ); \
  20. + return result; \
  21. + }
  22. #else // Use standard main()
  23. #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
  24. int main(int argc, char **argv) \