From: ebritten@ea.oac.uci.edu (Eric Britten)
Subject: Re: newbie dll question
21 May 1997 00:50:10 -0700
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <Pine.GSO.3.96.970520171126.15332B-100000.cygnus.gnu-win32@rigel.oac.uci.edu>
Reply-To: Eric Britten <ebritten@ea.oac.uci.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Original-To: "Bret A. Schuhmacher" <bas@healthcare.com>
Original-cc: gnu-win32@cygnus.com
In-Reply-To: <199705161320.JAA12675@alt.healthcare.com>
Original-Sender: owner-gnu-win32@cygnus.com



On Fri, 16 May 1997, Bret A. Schuhmacher wrote:

> Hi,
> 
> I've been using gnu-win32 since back in the v16 days, but never
> seriously until now.  I downloaded v18 recently and attempted to make
> a relocatable dll following all the instructions I could find (thanks
> to the people who forged the path :-)).  All the files below were
> taken from the instructions at
> http://www.cygnus.com/misc/gnu-win32/building-reloc-dlls.txt.
> 
>
[snip] 

To solve the problem of undefined references in your dll, you need to
include the import library that containes GetModuleHandleA@4.  In this
case you need to include libkernel32.a since GetModuleHandle is in
kernel32.dll

Change you link command to...

#link DLL
ld --base-file tclvc.base --dll -o tcl76.dll \
regexp.o tclAppInit.o tclAsync.o tclBasic.o tclCkalloc.o \
tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclDate.o tclEnv.o \
tclEvent.o tclExpr.o tclFCmd.o tclFHandle.o tclFileName.o tclGet.o \
tclHash.o tclHistory.o tclIO.o tclIOCmd.o tclIOSock.o tclIOUtil.o \
tclInterp.o tclLink.o tclLoad.o tclLoadNone.o tclMain.o  \
tclNotify.o tclParse.o tclPkg.o tclPosixStr.o tclPreserve.o tclProc.o \
tclUnixChan.o tclUnixFCmd.o tclUnixFile.o tclUnixInit.o tclUnixNotfy.o \
tclUnixPipe.o tclUnixSock.o tclUnixTime.o tclUtil.o tclVar.o panic.o  \
init.o fixup.o  $LIBPATH/libcygwin.a -e _dll_entry@12 \
$LIBPATH/libkernel32.a
	|
	|
	Here is the addition that will solve your problem.



Eric Britten






-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
