console/GUI programs... FW: [ros-kernel] Re: Striped VIM for ReactOS

Robert Collins robert.collins@itdomain.com.au
Tue Nov 13 19:29:00 GMT 2001


----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin-xfree@cygwin.com>
Sent: Wednesday, November 14, 2001 2:12 PM
Subject: Re: console/GUI programs... FW: [ros-kernel] Re: Striped VIM
for ReactOS


> On Wed, Nov 14, 2001 at 09:36:32AM +1100, Robert Collins wrote:
> >This may be of interest to some folk....
> >
> >I'm going to see if I can find such prolog code in gcc anywhere, and
if
> >so create a variant just for the mixed mode programs (such as
setup.exe,
> >the X server etc).
>
> I think the author is slightly confused.  The subsystem bit is set in
> the executable header.  MSVC's dumpbin.exe shows executables as either
a
> "CUI" if it is a console app or a "GUI" if it is a windows app.

Yes. This has been going back and forth in the reactos list for a few
days now.

> I'm pretty sure that the decision on how to handle the console is done
> by the windows loader.  AFAIK, it's not up to program control as to
> whether the program inherits a console or not.

That is also my understanding.

> If there was prologue code, it would somehow be invoked by -mwindows.
> If you look at the code in gcc, you can see that the only thing that
> -mwindows seems to do is pass the '--subsystem windows' option to ld.
> This does cause the linked program to use a different startup function
> but I don't think that it does anything magical.

I'm going to look into it regardless. If the author is confused, I waste
some time. If not, we _may_ have an answer..

Rob



More information about the Cygwin-xfree mailing list