From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41385 invoked by alias); 18 Jun 2019 18:15:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 41303 invoked by uid 89); 18 Jun 2019 18:15:30 -0000 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 Received: from rgout0805.bt.lon5.cpcloud.co.uk (HELO rgout0805.bt.lon5.cpcloud.co.uk) (65.20.0.152) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jun 2019 18:15:25 +0000 X-OWM-Source-IP: 86.141.131.103 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-SNCR-VADESECURE: CLEAN Received: from [192.168.1.102] (86.141.131.103) by rgout08.bt.lon5.cpcloud.co.uk (9.0.019.26-1) (authenticated as jonturney@btinternet.com) id 5BC47A87168349AA for cygwin@cygwin.com; Tue, 18 Jun 2019 19:15:21 +0100 Subject: Re: Windowless Perl To: The Cygwin Mailing List References: <5eebff75b1f37a968325ed4fc7dce3a8@plebeian.com> <87a7epgs5t.fsf@Rainer.invalid> <3a0322aa51937847ea35009b77c1aa34@plebeian.com> <5CFFEF09.6010805@tlinx.org> <1581789244.20190618182709@yandex.ru> From: Jon Turney Message-ID: Date: Tue, 18 Jun 2019 18:15:00 -0000 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-06/txt/msg00172.txt.bz2 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