Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
Sender: cygwin-owner@sourceware.cygnus.com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>,
	<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Date: Tue, 3 Aug 1999 01:16:04 +0100
From: "Gary V. Vaughan" <gary@oranda.demon.co.uk>
To: Steve McAndrewSmith <steve@finagle.org>
Cc: cygwin@sourceware.cygnus.com
Subject: Re: [Q]: Linking against DLLs.
Message-ID: <19990803011604.B11244@demon.co.uk>
References: <37A5CECC.54A4236C@finagle.org> <19990802204446.C9936@demon.co.uk> <19990802235316.A10952@demon.co.uk> <37A627C8.75E82DAB@finagle.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
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@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

