what does -mwindows mean?

Brian Dessent brian@dessent.net
Sun Apr 1 18:03:00 GMT 2007


wei wrote:

> Below is what I found in the makefile dev-cpp auto-generated:
> 
> LIBS =  -L"F:/Dev-Cpp/lib" -mwindows ../../lib/libcomctl32.a
> 
> What does -mwindows mean?

It just means to set a flag in the PE header that tells the OS not to
allocate a console for the program when started.  This is usually the
desired behavior when the program has a GUI, because you don't want the
console window appearing in that case.  It is really unfortunate that
somebody decided to call this "-mwindows", it should really be
-mno-console, which compliments its reciprocal option -mconsole (which
is the default.)

> I guess it means creating a windows application,but I

No, that's not what it means.  Everything that comes out of Cygwin's gcc
is a "windows application", there is no other kind.

> can't find it in gcc's documents.It's an extension of mingw-gcc?

No, it has nothing to do with MinGW, although the MinGW version of gcc
shares the same options.

Hey look, I've written this reply before:
<http://cygwin.com/ml/cygwin/2005-12/msg00548.html>

Brian

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



More information about the Cygwin mailing list