Windowless Perl

Jon Turney
Tue Jun 18 18:15:00 GMT 2019

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 file.
> 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.


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."

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list