delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/05/27/06:52:06

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <483BE7BA.F7358F2@dessent.net>
Date: Tue, 27 May 2008 03:51:38 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Urgent !!! Reg Linking sybase DLL in cygwin..
References: <182dc94a0805270310h486236bawb4a4c3a0b65c354a AT mail DOT gmail DOT com> <039b01c8bfe6$7aa70a90$2708a8c0 AT CAM DOT ARTIMI DOT COM>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dave Korn wrote:

>   So, there is no debug info in the DLL.  In that case, you need to get the
> list of exports to make the .def file some other way: perhaps you can run
> 'pexports' on it, or in a last resort DUMPBIN, and you may need to do some
> hand-editing of the .def file that results.  See here:

That's a lot of extra work for no good reason.  GNU ld can link directly
against a DLL without using any import lib, just specify its filename on
the link command.  The only real reason you need an import library is if
you're doing things like adding aliases for symbol names, or you need to
remove stdcall name decorations.  (Or if you need the name indirection
that an import library provides, e.g. being able to have -lfoo refer to
libfoo.dll.a which refers to cygfoo-12.dll.)  But if you simply want to
link against a DLL you can do so directly without any of the mess of
pexports or def files or import libs or whatnot.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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