Subject: Re: __imp_reent_data
From: "Gerrit P. Haase" <[email-masked]>
To: [email-masked]
Date: Sat, 22 Sep 2001 20:07:48 +0200

Stephen Dyke schrieb am 2001-09-22, 16:57: 

>Where is '__imp_reent_data' defined? 

libcygwin.a 

The list of all cygwin exports includes reent_data: 
EXPORTS 
[...] 
	reent_data @ 995 ; 
[...] 
>I'm trying to build a relocateable dll version of boehm's GC using 
>cygwin-1.3.3 and all latest packages (with src). 
> 
>$ make 
>rm -f skgc.a 
>ar cr skgc.a *.o 
>ranlib skgc.a 
>echo '.section .idata$3'        > dll_fixup.s 
>echo '.long 0,0,0,0,0'          >> dll_fixup.s 
>as  -o dll_fixup.o dll_fixup.s 
>gcc    -c -o dll_init.o dll_init.c 
>echo EXPORTS > skgc.def 
>echo skgc_impure_ptr = _impure_ptr >> skgc.def 
>nm skgc.a | sed -n '/^........ [BCDRT] _/s/[^_]*_//p' >> skgc.def 
>dlltool                 \ 
>        --def skgc.def                                  \ 
>        --dllname skgc.dll                              \ 
>        --output-exp skgc.exp                           \ 
>        --output-lib skgc_dll.a 
>echo "/* automatically generated by Makefile.DLLs */"   > skgc_dll.c 

Makefile.DLLs doesn't work these days. 
Look at Chucks site: 
http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/dll-stuff/ 
for a better explanation howto build dll's. 

>echo "void *_impure_ptr;"                               >> skgc_dll.c 
>gcc    -c -o skgc_dll.o skgc_dll.c 
>ld   --dll -o skgc.dll                  \ 
>        -e _dll_entry@12                                        \ 
>        skgc.exp skgc.a skgc_dll.o                                      \ 
>        dll_init.o dll_fixup.o                                  \ 
>                                                \ 
>        -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5 -L/usr/lib -L/usr/lib/w32 
>api -lgcc -lcygwin -lkernel32 -lgcc 
>dll_init.o(.text+0x4):dll_init.c: undefined reference to `__imp_reent_data' 
>make: *** [skgc.dll] Error 1 
>rm skgc.exp skgc.def skgc_dll.o skgc_dll.c 

You may also look at the FAQ (little bit outdated): 
http://www.cygwin.com/faq/faq_4.html#SEC103 

Gerrit 

-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/