X-Spam-Check-By: sourceware.org
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 18 Jul 2007 14:15:56 +0200
From: "Hans Streibel" <streibel.2006@gmx.net>
In-Reply-To: <026a01c7c932$4cae0810$2e08a8c0@CAM.ARTIMI.COM>
Message-ID: <20070718121556.83920@gmx.net>
MIME-Version: 1.0
References: <20070718100058.203680@gmx.net> <20070718105312.83940@gmx.net>  <026a01c7c932$4cae0810$2e08a8c0@CAM.ARTIMI.COM>
Subject: Re: Own Compiled Program Immediately Crashes on Startup
To: cygwin@cygwin.com
X-Authenticated: #31121696
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
Content-Transfer-Encoding: 7bit
X-GMX-UID: SDanfv4VYW0te0SSu2dpAJh8amthc5uB
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> >> It may be missing a DLL it needs.  Run "cygcheck
> </path/to/your/binary>"
> >> and see if the output lists anything missing.
> > 
> > $ 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?

> It could certainly be a problem if a cygwin-based dll
> gets initialised earlier in the link order than the cygwin dll itself.

Just for comparison, here is the cygcheck output for
my running "hello world" program:

$ cygcheck /tmp/hello.exe
C:/cygwin/tmp/hello.exe
  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

> I'm going to have to take a guess here: did the instructions tell you to
> use "-mno-cygwin" in the compiler flags?

No.
And I did not use that flag.


Maybe you could try to compile and run that program at your site?
Maybe my environment is somehow broken.
I could send you the sources and my cygwin Makefile via private email.

Cheers,

Hans

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

--
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/

