cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Linking to libcurl from a MSVC 6 Win32 console project

From: Jan Benes <jbenes_at_gmail.com>
Date: Mon, 30 Oct 2006 15:45:35 +0100

I think that whether you link the MFC libs statically or dynamically
doesn't matter. These don't have anythink to do with libcurl at all.
The CURL_STATIC is, AFAIK, a #define, ie use it as

#define CURL_STATIC

that should do it. You'll also need to create a new project (win32
static library), put in all the sources from the dynamic one and
compile. That shoud create a .lib file, which is what you need. Also,
I remember there's some configuratio header for including platform
specific headers

Jan

On 10/30/06, Madhurya Gupta <inform.maddy_at_gmail.com> wrote:
> Using the pure binary libcurl package from here
> http://curl.haxx.se/download/libcurl-7.15.4-win32-ssl-sspi.zip
>
> In lib directory of that package, I find the following four files
> libcurl.a
> libcurl.dll.a
> libcurl.la
> libcurl-3.dll
>
> My MSVC project has proper references to the header files.
>
> When I try to link it to libcurl.a (after selecting "Use MFC in a static
> library" in project settings), I keep getting the errors
> unresolved external symbol __imp__curl_easy_cleanup
> unresolved external symbol __imp__curl_easy_perform
> unresolved external symbol __imp__curl_easy_setopt
> unresolved external symbol __imp__curl_easy_init
>
> I checked the faq http://curl.haxx.se/docs/faq.html#5.7
> and couldn't figure out which correct lib am I supposed to link my program
> to. Also, couldn't figure out where do I need to add -DCURL_STATICLIB as
> mentioned in the faq.
>
> I also tried copying libcurl-3.dll in %\windows\system folder and compiling
> the project with "Use MFC in a shared DLL", but in vain.
>
> TIA
>
> --
> cURLMaddy
>
Received on 2006-10-30