[Q]: Linking against DLLs.

Gary V. Vaughan gary@oranda.demon.co.uk
Tue Aug 31 23:49:00 GMT 1999


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:gary@oranda.demon.co.uk
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       gary@gnu.org 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
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 cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list