cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl eas built whitout LIBSSH2

From: Brian Dessent <brian_at_dessent.net>
Date: Wed, 23 Apr 2008 07:47:52 -0700

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.

> 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.

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.

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).

Brian
Received on 2008-04-23