public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: Windowless Perl
Date: Tue, 18 Jun 2019 18:15:00 -0000	[thread overview]
Message-ID: <dcdead25-3ee4-e3c1-ffe8-4feeabab34d0@dronecode.org.uk> (raw)
In-Reply-To: <1581789244.20190618182709@yandex.ru>

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

  reply	other threads:[~2019-06-18 18:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10 17:56 Chris Wagner
2019-06-10 19:24 ` Achim Gratz
2019-06-10 20:13   ` Chris Wagner
2019-06-10 21:23     ` Bill Stewart
2019-06-11 18:12     ` L A Walsh
2019-06-18 15:35       ` Andrey Repin
2019-06-18 18:15         ` Jon Turney [this message]
2019-06-19 19:17           ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcdead25-3ee4-e3c1-ffe8-4feeabab34d0@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).