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:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; q=dns; s=default; b=WfarzmecvVwCshfGA1Rw/ZGRJ7jfPg 0Nevkhd5NupUqfNrJDd4QueYkVa83UtENm19ril0Jv0BccwmTO+MBEkn+QTYTYRj XaPUH8UU8MyLcyOcXm0UlhPAj7WvsH4BTFONYdRoD5VgMl5saU7/+WlJVCKkvxei 3dO0bOic0+qbk= 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:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; s=default; bh=ZcNHBnbfKf/EUfbNKEQPgarPYPk=; b=oFSO kHUTnj0PUPHtU1XpVALy+hn56Kbpalky8F6ueHkYS4s8RqsisfRniC6wYeWHrdBv s3o/Tlrx3ETleAX8Lk4UFrQoxktfuW8OG5FnozVuTp5KbLCNIyiPj6eqd9Uq1Dvu dJozJ/3HSWwU5smN2ehT8+30Diep52PlJ1nuMpY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*UA:en-US, H*r:Unknown, clue X-HELO: blaine.gmane.org To: cygwin AT cygwin DOT com From: =?UTF-8?Q?Ren=c3=a9_Berber?= Subject: Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd Date: Wed, 21 Jun 2017 16:48:18 -0500 Lines: 44 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0 In-Reply-To: X-IsSubscribed: yes On 6/21/2017 4:10 PM, Wouter van Doorn wrote: > Having installed Cygwin with no errors I could see, I went on to > compile and run "hello world" - as you do. I could make it go from a > windows command prompt after modifying the system path to include > cygwin\bin, so - so far so good. > > From the cygwin terminal, however, the same executable refuses to play > ball. No text is shown; the command prompt returns instantly. [snip] It could be the program itself, i.e. not coded for a Posix environment, or it could be your PATH which should include /usr/bin (as shown, not as a Windows path C:\...) Easiest way to figure it out is by running: $ ldd hello (or whatever the name of your executable is) (sample output) ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffaf6600000) ??? => ??? (0x77790000) wow64.dll => /cygdrive/c/WINDOWS/System32/wow64.dll (0x5aa40000) wow64win.dll => /cygdrive/c/WINDOWS/System32/wow64win.dll (0x5aaa0000) In this case the missing cygwin1.dll doesn't even show its name, it happens to be the 32-bit version, because I ran ldd from a 64-bit Cygwin on a 32-bit Cygwin program, my PATH doesn't include the cygwin 32-bit binary directory. And if that doesn't show the missing libraries, then even $ file hello could show a clue, like "PE32+ executable (GUI) x86-64 (stripped to external PDB), for MS Windows" which is a GUI program compiled with MinGW, i.e. doesn't depend on Cygwin. Cygwin is not mentioned in the output of file, even a Cygwin console program shows something like "PE32 executable (console) Intel 80386, for MS Windows" or "PE32+ executable (console) x86-64, for MS Windows". Hope this helps. -- R. Berber -- 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