This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: linking against dlls

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 
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:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]