delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/08/20/22:08:33

From: stf AT hugo DOT int-evry DOT fr ("Stephane Mariel")
Subject: DLL Problem
20 Aug 1997 22:08:33 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199708201219.OAA01103.cygnus.gnu-win32@hugo.int-evry.fr>
Original-To: <gnu-win32 AT cygnus DOT com>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1161
Original-Sender: owner-gnu-win32 AT cygnus DOT com

[this is a repost, the first one should be lost, hope you will not recieve
it twice]

Hi,

I'm trying to port a tcl module from unix to win95 as a dll to load within
wish. 

So i tried to began with the example provided on cygnus.com , it works
fine, i got my foo.dll, main.exe, but moving to my real software when I run
ld I got:
c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libccrt0.o)(.t

ext+0x8a):libccrt0.cc: undefined reference to `GetModuleHandleA AT 4'
c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libcmain.o)(.t

ext+0xc):libcmain.cc: undefined reference to `GetModuleHandleA AT 4'
c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libcmain.o)(.t

ext+0x15):libcmain.cc: undefined reference to `GetCommandLineA AT 0'
c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libcmain.o)(.t

ext+0x1e):libcmain.cc: undefined reference to `WinMain AT 16'

This seems to be a reentrancy problem, since a simple call like :
fprintf(stderr, ...) 
makes use of _impure_ptr which is a struct _reent* ptr that is provided by
any process using the dll. So , probably the exact question is : how to say
to ld: this symbol must not be search in libc, (libccrto.o, libcmain.o) but
must be mapped to a symbol defined in the calling process?

Any idea?

Thanks,

stf

 


-
For help on using this list (especially unsubscribing), 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