This is the mail archive of the
mailing list for the Cygwin project.
Re: linking against dlls
- To: bumps man <bumps at linuxmail dot org>
- Subject: Re: linking against dlls
- From: "Charles S. Wilson" <cwilson at ece dot gatech dot edu>
- Date: Fri, 24 Aug 2001 12:24:45 -0400
- CC: cygwin at cygwin dot com
- References: <firstname.lastname@example.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...
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html