This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: -mwindows and --Wl,subsystem,windows
Andy Koppe wrote:
> According to this post on the gcc mailing list a few years back, gcc's
> -mwindows option should imply --Wl,subsystem,windows:
>
> http://gcc.gnu.org/ml/gcc-help/2004-01/msg00225.html
Yep, it still does.
> I find, however, that I'm getting different behaviour when passing
> --Wl,subsystem,windows explicitly. (Without it, stdout from mintty
> opens a console, but with it, the output ends up in the mintty window
> itself. No idea how the latter comes about.)
Besides adding the subsystem option, -mwindows does a bit more besides,
adding "-lgdi32 -lcomdlg32" to the link command-line. That's probably not
relevant here though.
> What is the intended behaviour for -mwindows, and should it be used at all?
It should be used when you want a GUI application rather than a console
application, i.e. one that's going to have a window and pump windows messages.
It's not entirely surprising that you'd get no console when you add it to
the command-line. (If you need both a console - maybe hidden - and a win32
message loop as well, I think you can make a GUI app that calls AllocConsole
at runtime.)
cheers,
DaveK
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/