Windowless Perl

Jon Turney jon.turney@dronecode.org.uk
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.

See 
https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#windows-subsystem

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

See 
https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol, 
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:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list