X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49CFB989.9040308@gmail.com> Date: Sun, 29 Mar 2009 19:10:17 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: -mwindows and --Wl,subsystem,windows References: <416096c60903291050r44203e40j19a83d16aebabb3d AT mail DOT gmail DOT com> In-Reply-To: <416096c60903291050r44203e40j19a83d16aebabb3d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/