delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/06/18/14:16:38

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=tg8BA6Fx5Fa1IlxB
U9DqgYiZlxEKBd9zeS2VzMG/q6fqDZm65ZmajqbFfuCGZHBW7b58kmOlgaMGm23M
iRou8ZtE6ggPCCmMrljrLu9M/DafQ/0DSWzG7CE+QwA5njIkqZdfzPRsoPo4PPgp
6WV/MDQtq1DpANoQmNW4pJw9Nbw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=kGZEntYHPha9/Zjiao4OKW
tAnzw=; b=Eqrg8abl7a8Mkp3Z5FKaU1FZ38jT+6IJOmzM+hYPGqotEkk1wfJSdF
EyXVLmBL1KZCTL8Q+vtRIsNf8Stm/Klgvs0+H/vWy0gHknzmci6lgpOqZDsIB2xU
rllv3WIlVeUKHMSVISS4Y80kaoT2nTtpRXyH8TcmvxBPpAgyuXer8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=Chris, Wagner, wagner, Andrey
X-HELO: rgout0805.bt.lon5.cpcloud.co.uk
X-OWM-Source-IP: 86.141.131.103 (GB)
X-OWM-Env-Sender: jonturney AT btinternet DOT com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-SNCR-VADESECURE: CLEAN
Subject: Re: Windowless Perl
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <5eebff75b1f37a968325ed4fc7dce3a8 AT plebeian DOT com> <87a7epgs5t DOT fsf AT Rainer DOT invalid> <3a0322aa51937847ea35009b77c1aa34 AT plebeian DOT com> <5CFFEF09 DOT 6010805 AT tlinx DOT org> <1581789244 DOT 20190618182709 AT yandex DOT ru>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Message-ID: <dcdead25-3ee4-e3c1-ffe8-4feeabab34d0@dronecode.org.uk>
Date: Tue, 18 Jun 2019 19:15:20 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019