curl-library
Re: Compiling on MingW32 without a DLL
Date: Tue, 21 Feb 2006 13:46:32 -0500
Daniel Stenberg wrote:
> On Mon, 20 Feb 2006, Matthew "Zashi" Hiles wrote:
>
>> /tmp/fakeroot/curl-7.15.1/lib/transfer.c:2226: undefined reference to
>> `__imp__curl_easy_strerror'
>
>
> Allow me to quote the FAQ (http://curl.haxx.se/docs/faq.html#5.7)
>
> When building an application that uses the static libcurl library,
> you must
> add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for
> dynamic import symbols. If you get linker error like "unknown symbol
> __imp__curl_easy_init ..." you have linked against the wrong (static)
> library. If you want to use the libcurl.dll and import lib, you
> don't need
> any extra CFLAGS, but use one of the import libraries below.
>
That did not quite do the trick. But thanks for pointing that out to me,
here's what did work:
i586-mingw32msvc-g++ baf-0.6.cc -o baf-6.exe -lcurl -lwinmm -lws2_32
For some reason libcurl's dependencies weren't being linked, even though
the libcurl.la file is present. (Perhaps this should be noted in the FAQ
?)
Thanks for your help and patience. I will work harder to figure things
out on my own. Keep up the great work guys.
~Zashi
Received on 2006-02-21