Cygwin gcc/ld doesn't like some DLL filenames...

Bernard Dautrevaux Dautrevaux@microprocess.com
Thu Oct 26 01:45:00 GMT 2000


> -----Original Message-----
> From: Jason Tishler [ mailto:Jason.Tishler@dothill.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@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list