Subject: Re: [Q]: Linking against DLLs.
From: "Gary V. Vaughan" <[email-masked]>
To: Steve McAndrewSmith <[email-masked]>
Cc: [email-masked]
Date: Tue, 3 Aug 1999 01:16:04 +0100

On Mon, Aug 02, 1999 at 04:20:40PM -0700, Steve McAndrewSmith wrote:
> "Gary V. Vaughan" wrote:
> 
> > There is some code I use in libtool for that very purpose (adapted from
> > code written by DJ Delorie for the next version of binutils).  Incase
> > you have trouble finding it (it is hidden inside the libtool script),
> > and for the benefit of the mail archives, I have extracted a copy and
> > attached.  This time for real... sorry folks.
> 
> O.k., very nice, very nice, prints out a list of all the imports.  Now
> what?

Oh, yes.  Well that was the difficult part.  You now have an defs file
for the dll, and it is just a matter of building the import library for
that dll using dlltool:

  dlltool --dllname foo.dll --def foo.def --output-lib libfoo.a
  
Linking against the static library libfoo.a will now stub your
executable to find symbols exported by foo.dll at runtime by loading
that dll from your search path.

Cheers,
	Gary.
-- 
  ___              _   ___   __              _  email:[email-masked]
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       [email-masked] 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page:  /___/                      /___/                pgp-2 public key:
http://www.oranda.demon.co.uk               http://www.oranda.demon.co.uk/pgp

--
Want to unsubscribe from this list?
Send a message to [email-masked]