cURL / Mailing Lists / curl-library / Single Mail


Re: [curlib.lib] unresolved externals Problems!!

From: Brian Dessent <>
Date: Mon, 09 Apr 2007 15:14:02 -0700

Tiago Conceição wrote:

> error LNK2019: unresolved external symbol __imp__curl_easy_init referenced
> in function "void __cdecl test(void)" (?test@@YAXXZ)

The fact that the linker can't find __imp__curl_easy_init means that
when the compiler parsed the curl.h header, CURL_STATICLIB was not
defined and hence the function declarations included
__declspec(dllimport). This won't work when statically linking. Thus
you need to fix however it is you are defining CURL_STATICLIB, because
it's not correct. If you are doing it in with a #define your file, it
must happen before you #include any curl headers.

Received on 2007-04-10