delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/18/09:41:55

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
References: <20070718100058 DOT 203680 AT gmx DOT net> <20070718105312 DOT 83940 AT gmx DOT net> <026a01c7c932$4cae0810$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20070718121556 DOT 83920 AT gmx DOT net> <026e01c7c936$bad581c0$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20070718131325 DOT GO20662 AT calimero DOT vinschen DOT de>
Subject: RE: Own Compiled Program Immediately Crashes on Startup
Date: Wed, 18 Jul 2007 14:41:34 +0100
Message-ID: <027801c7c941$5b1c0a50$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <20070718131325.GO20662@calimero.vinschen.de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On 18 July 2007 14:13, Corinna Vinschen wrote:

> On Jul 18 13:25, Dave Korn wrote:
>> On 18 July 2007 13:16, Hans Streibel wrote:
>> 
>>>>> $ cygcheck `pwd`/jjove.exe
>>>>> C:/cygwin/home/hstreibel/private/src/jove/jove4.16.0.65/jjove.exe
>>>>>   C:\cygwin\bin\cygncurses-8.dll
>>>>>     C:\cygwin\bin\cygwin1.dll
>>>>>       C:\WINDOWS\system32\ADVAPI32.DLL
>>>>>         C:\WINDOWS\system32\ntdll.dll
>>>>>         C:\WINDOWS\system32\KERNEL32.dll
>>>>>         C:\WINDOWS\system32\RPCRT4.dll
>>>>> 
>>>> It looks pretty odd to me that the only dll the executable is linked
>>>> against is the cygncurses one, and that the cygwin dll is only linked as
>>>> an indirect dependency of that.
>>> 
>>> How can this link order be changed so that the cygwin dll
>>> is linked in first?
>> 
>>   Well, for a start, you'd need to link against the cygwin dll directly,
>> and it would need to be first on the linker command line.
> 
> Dave, you need more coffee.  The above output is nothing unusual.
> And since when do you need -lcyginw on the linker comand line at all?

  Always, but it is generally placed there for you by the gcc driver - unless
you try and link a program using ld, which was what I was wondering if it had
happened.

>>   Yes, that's how a cygwin executable should look; the first dependency
>> should be directly on the cygwin dll.
> 
> Try cygcheck /bin/ssh.exe

  Hey, I've never seen it before.  I guess it isn't the problem then.  Trouble
is, there's very little else goes on before main.

  Hans, is there any C++ with static objects with constructors in this
program?

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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