Wed Jun 19 19:17:00 GMT 2019
On 2019-06-18 12:15, Jon Turney wrote:
> On 18/06/2019 16:27, Andrey Repin wrote:
>>> On 2019/06/10 13:12, Chris Wagner wrote:
>>>> I didn't know about run, thanks for the tip. However when I use it to
>>>> launch something from the Start Menu Run command, it still pops open a
>>>> terminal window of some kind for a fraction of a second. I'm on
>>>> Windows 7.
>>> Windows has a flag set in each EXE as to whether or not it is a console
>>> or GUI program. There are tools that can set the flag in a given EXE
>> It's not a flag, it's an exported function.
>> If a program exports winmain(), it's a gui program, if it exports main(),
>> it's a console program.
> No. It really is a flag.
Strictly speaking a field flag value:
$ objdump -x $(dirname $(cygpath $COMSPEC))/csrss | grep -w '^Subsystem'
Subsystem 00000001 (NT native)
$ objdump -x /setup | grep -w '^Subsystem'
Subsystem 00000002 (Windows GUI)
$ objdump -x /bin/cygwin1.dll | grep -w '^Subsystem'
Subsystem 00000003 (Windows CUI)
> You are describing the behaviour of (recent versions of) the Microsoft linker,
> which guesses the default value of this flag based on what symbols are defined
> specifically the sentence "If the /DLL or /SUBSYSTEM option is not specified,
> the linker selects a subsystem and entry point depending on whether main or
> WinMain is defined."
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin