cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Windows build problems

From: Gisle Vanem <giva_at_bgnett.no>
Date: Sat, 08 Jan 2005 16:19:08 +0100

"Christopher R. Palmer" wrote:

> After running nmake vc-ssl-zlib, I have a functioning curl.exe and a
> libcurl.lib. Much later in my build process, linking my code which uses
> the multi interface reports:
>
> LINK : warning LNK4049: locally defined symbol "_curl_global_init" imported
> LINK : warning LNK4049: locally defined symbol "_curl_slist_free_all" imported
> LINK : warning LNK4049: locally defined symbol "_curl_slist_append" imported
> LINK : warning LNK4049: locally defined symbol "_curl_easy_cleanup" imported
> LINK : warning LNK4049: locally defined symbol "_curl_easy_setopt" imported
> LINK : warning LNK4049: locally defined symbol "_curl_easy_init" imported
> LINK : warning LNK4049: locally defined symbol "_curl_easy_getinfo" imported
> libmisc.lib(fetch.obj) : error LNK2001: unresolved external symbol
> __imp__curl_version

Looks like you want to use libcurl.dll. Then don't link to libcurl.lib.
Use liburl_imp.lib instead. Ref. FAQ section 5.7.

> As I said, this is likely my error in my build process. Unfortunately, I
> have no idea how the "__imp__" symbols are involved in the whole process
> which is making it somewhat challenging to debug.

The __imp_ symbols are just stubs for functions decorated as
__declspec(dllimport) int foo (void);

These stubs are only helpers to point to the real functions in libcurl.dll.

--gv
Received on 2005-01-08