delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/20/14:59:11

From: fabeau AT hexale DOT fdn DOT fr (Fabrice Beauvir)
Subject: request using dlltool
20 Jan 1997 14:59:11 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <9701201932.AA27730.cygnus.gnu-win32@hexale.fdn.fr>
Mime-Version: 1.0
Original-To: gnu-win32 AT cygnus DOT com
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: owner-gnu-win32 AT cygnus DOT com

hi all, 

 I am looking for some info about building dll with dlltool.
 I have some problem using it under Windows NT 3.51
 I am using GNU win32 v1.16
 here is my makefile , Where I have add a printf() to foo example:

----------------------------------------------------- 
LDLIB = -lc -lcygwin -luser32 -lgdi32
all:: foo.o foo2.o foo.exp foo.dll main.exe  
foo.o:
	gcc -c foo.c 
foo2.o:
	gcc -c foo2.c
foo.exp:
	dlltool --def foo.def --output-exp foo.exp --dllname foo.dll --output-lib foo.a 
main.exe:
	gcc main.c -o main.exe

foo.dll:
	ld -o foo.dll foo.exp foo.a $(LDLIB) 
----------------------------------------------------- 

A main.exe is generated but when I execute it , it cause a segmentation fault. Where is my fault ?
(gdb) run main
Starting program: /home/kerSv4/fabeau/kerSs1/pKernel/src/tmp/main.exe main
warning: LDR: LdrpMapDll Relocating: Base Name foo.dll

240000:/home/kerSv4/fabeau/kerSs1/pKernel/src/tmp/foo.dll
10000000:/bin/cygwin.dll
77f20000:/WINNT35/system32/kernel32.dll
77e20000:/WINNT35/system32/advapi32.dll
77e60000:/WINNT35/system32/RPCRT4.dll
761f0000:/WINNT35/System32/wsock32.dll
77db0000:/WINNT35/system32/CRTDLL.dll
77ea0000:/WINNT35/system32/USER32.dll
77ee0000:/WINNT35/system32/GDI32.dll
gdb: unknown target exception 0xc0000135 at 0x77fa0309

Program received signal SIGSEGV, Segmentation fault.
0x40b4 in ?? ()
(gdb)
-----------------------------------------------------------------------
I've got pop-up window : "Unable to locate dll ;"

thanks for your comprehension. 

-- 
                                              merci,
                                              Fabrice Beauvir
(e-mail : fabeau AT hexale DOT fdn DOT fr)
------------------------------------------------------------------------
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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