delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/26/04:45:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <17B78BDF120BD411B70100500422FC6309E13F@IIS000>
From: Bernard Dautrevaux <Dautrevaux AT microprocess DOT com>
To: "'Jason Tishler'" <Jason DOT Tishler AT dothill DOT com>,
Cygwin
<cygwin AT sources DOT redhat DOT com>
Subject: RE: Cygwin gcc/ld doesn't like some DLL filenames...
Date: Thu, 26 Oct 2000 10:33:48 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

> -----Original Message-----
> From: Jason Tishler [mailto:Jason DOT Tishler AT dothill DOT com]
> Sent: Wednesday, October 25, 2000 10:24 PM
> To: Cygwin
> Subject: Cygwin gcc/ld doesn't like some DLL filenames...
> 
> 
> This one is almost embarrassing...
> 
> If I create a DLL called python2.0.dll and link with its 
> import library
> from a different directory, then the resulting executable 
> crashes.  If I
> link in the same directory as the import library, then the resulting
> executable runs normally.  If I change the name of the DLL to 
> something
> else and link with its import library from a different directory, then
> the resulting executable runs normally.
> 
> Can anyone explain this strange behavior?  Is there some perl 
> conspiracy
> going on here? :,)
> 
> The following is the steps to reproduce this problem:
> 
>     $ gcc -c sub.c
>     $ gcc -c main.c
>     $ dlltool --export-all --output-def sub.def sub.o
>     $ gcc -shared -Wl,--enable-auto-image-base -o 
> python2.0.dll -Wl,--out-implib=libsub.dll.a sub.def sub.o
>     $ mkdir dir
>     $ cd dir
>     $ gcc ../main.o ../libsub.dll.a -o ../main
>     $ cd ..
>     $ ./main
>           0 [main] main 12817 handle_exceptions: Exception: 
> STATUS_ACCESS_VIOLATION
>        1292 [main] main 12817 stackdump: Dumping stack trace 
> to main.exe.stackdump
> 
> But if I link in the same directory as the import library, then main
> executes normally:
> 
>     $ gcc main.o libsub.dll.a -o main
>     $ ./main
>     hello
> 
> Or if I change the name of the DLL to something else (i.e., 
> python2.1.dll),
> then main also executes normally:
> 
>     $ gcc -shared -Wl,--enable-auto-image-base -o 
> python2.1.dll -Wl,--out-implib=libsub.dll.a sub.def sub.o
>     Creating library file: libsub.dll.a
>     $ cd dir
>     $ gcc ../main.o ../libsub.dll.a -o ../main
>     $ cd ..
>     $ ./main
>     hello
> 
> See attached for sub.c, main.c, and my cygcheck output.
> 

Sure you do not have any other "python2.0.dll" somewhere on your system
(even if it's not on the PATH)?

Could you try "cygcheck -v ./main.exe" for both cases?

HTH

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux AT microprocess DOT com
		b DOT dautrevaux AT usa DOT net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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