delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/07/19:15:50

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Tor Lillqvist <tml AT iki DOT fi>
MIME-Version: 1.0
Message-ID: <14211.57334.420000.479849@tippen>
Date: Thu, 8 Jul 1999 02:17:10 +0300 (FLE Daylight Time)
To: DJ Delorie <dj AT delorie DOT com>
Cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: How can I get a .dll to resolve at runtime ?
In-Reply-To: <199907072246.SAA07598@indy.delorie.com>
References: <3783C923 DOT C7742C50 AT olf DOT com>
<199907072246 DOT SAA07598 AT indy DOT delorie DOT com>
X-Mailer: VM 6.62 under Emacs 19.34.6

DJ Delorie writes:
 > One thing to try is to export the function with a .DEF file, and see
 > if that works.  You'd have to build an import library for your
 > executable and link the dll against that, but I'm not sure if NT would
 > even *allow* such a hack.

Yes, it works quite well (on Win9x at least). You can specify a .def
file when building an .exe with CL (or LINK), and it produces an
import .LIB. With gcc -mno-cygwin it's quite a bit more convoluted,
but it's possible. I came to the conclusion that with gcc you must
mark the exported functions with __declspec(dllexport), the .def file
is ignored. (And you must do the dance with multiple gcc and dlltool
passes.) I might be wrong...

--tml


--
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