delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/02/20:18:35

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Tue, 3 Aug 1999 01:16:04 +0100
From: "Gary V. Vaughan" <gary AT oranda DOT demon DOT co DOT uk>
To: Steve McAndrewSmith <steve AT finagle DOT org>
Cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: [Q]: Linking against DLLs.
Message-ID: <19990803011604.B11244@demon.co.uk>
References: <37A5CECC DOT 54A4236C AT finagle DOT org> <19990802204446 DOT C9936 AT demon DOT co DOT uk> <19990802235316 DOT A10952 AT demon DOT co DOT uk> <37A627C8 DOT 75E82DAB AT finagle DOT org>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.6i
In-Reply-To: <37A627C8.75E82DAB@finagle.org>; from Steve McAndrewSmith on Mon, Aug 02, 1999 at 04:20:40PM -0700
X-Operating-System: Linux oranda 2.2.10

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 AT oranda DOT demon DOT co DOT uk
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       gary AT gnu DOT 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019