delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/24/12:25:50

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B867FCD.1070600@ece.gatech.edu>
Date: Fri, 24 Aug 2001 12:24:45 -0400
From: "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: bumps man <bumps AT linuxmail DOT org>
CC: cygwin AT cygwin DOT com
Subject: Re: linking against dlls
References: <20010824135523 DOT 26916 DOT qmail AT linuxmail DOT org>

bumps man wrote:

> I apologize if this problem is covered in the documentation.  I
> haven't been able to find an answer, in docs or in newsgroups.
> 
> The "Linking Against DLLs" section of the user manual describes a
> method which "will only work if the DLL is not stripped. Otherwise you
> will get an error message: 'No symbols in foo.dll'"
> 
> I wish to link to a DLL which is apparently stripped, since I recieve
> this error message.
> 
> The documentation does not say whether this is possible or not; maybe
> the implication is that it is not possible, I don't know.


Not directly.  You can create an implib for the dll, and then link 
against the implib.  Use pexports to create a .def file for the dll, 
then use dlltool to generate an implib from the .def+.dll.  pexports is 
available from http://infoservice.lg.ua/~paul/devel/binutils.html. 
Dlltool is part of binutils.

Obviously, I haven't done all your work for you -- you're going to have 
to read the manuals to figure out how to do the above tasks...


> 
> Since Visual C++ is able to link against a stripped DLL, my second
> more general question is whether cygwin/gcc can
> do everything MSVC++ can do.


Doesn't MSVC ship .lib files (VC-style import libs) for the system 
.dll's and ACTUALLY links against those?)  I'm not convinced that MSVC 
*can* link directly to a stripped dll (or even an unstripped dll, for 
that matter) without using an import lib.  gcc's ability to link 
directly to a dll (unstripped) without using an implib was fairly 
innovative, I thought...

--Chuck


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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