Re: libcurl eas built whitout LIBSSH2
Date: Wed, 23 Apr 2008 16:12:05 +0100
Brian Dessent wrote:
> Stephen Collyer wrote:
>> Now ISTR that the Windows linker expects to find the export list
>> for, say, libcurl.dll in libcurl.lib, but also that libcurl.lib
>> can be a static library.
> The names have no formal relation. You can make foo.lib which is an
> import library for bar.dll.
OK, but AFAICS, by default, VS expects foo.lib to be an import library
>> Now given the size of my libcurl.lib my
>> suspicion is that it is, in fact, a static library, and I'm
>> missing the "export list" version of libcurl.lib that should have
>> been generated at the same time as libcurl.dll.
> The term you're looking for is import library. That is a .lib file that
> describes what a .dll exports, and is used for linking programs against
> that dll.
Right. However, a .lib can also be a static library, no ?
Is there a tool to tell me whether or not a given .lib is
an import or static library ?
> Again, you need to decide if you want to statically link with libcurl or
> link to the libcurl DLL (dynamic.) If the former then you need to
> rebuild all your code with CURL_STATIC defined and link with the
> libcurl.lib static library. If the latter then you need to link with
> the libcurl import library and not the static library. If the binary
> package you're using didn't come with an import library then you need to
> use something else or build it from source yourself.
Well, I want to link against the .dll and the build system is set
up to do that (and does it correctly, as I can link against a
libcurl 7.15.0 .dll), so I'm suspecting that Mike didn't supply
an import library. (Maybe Mike can confirm if he's reading ...)
> The .exp file describes the exports of a given .dll, and is created at
> the same time as the import library. It's kind of the inverse of an
> import library. But it's usually only used when creating the dll
> itself, such as when you use a .def file to define the exports rather
> than using __declspec(dllexport).
Right, that's useful to know to those of us who are hard-of-Windows.
Is it possible to generate an import library from a .def file and
a .dll ? It sounds like there should be all the required info
-- Regards Steve Collyer Netspinner LtdReceived on 2008-04-23