X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74698d3a22d5e611bbcd731a3ade616c66cfaca6..1c507b171af7fb2e0ed36fca546b7951c8ab5dd2:/src/common/appcmn.cpp?ds=inline diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 1018cbae7c..2398dad313 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -191,8 +191,15 @@ int wxAppBase::FilterEvent(wxEvent& WXUNUSED(event)) void wxAppBase::DoInit() { - if(wxMessageOutput::Get()) return; -#if wxUSE_GUI + if (wxMessageOutput::Get()) + return; + + // NB: The standard way of printing help on command line arguments (app --help) + // is (according to common practice): + // - console apps: to stderr (on any platform) + // - GUI apps: stderr on Unix platforms (!) + // message box under Windows and others +#if wxUSE_GUI && !defined(__UNIX__) #ifdef __WXMOTIF__ wxMessageOutput::Set(new wxMessageOutputLog); #else