cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl compiles w/ MinGW but doesn't work

From: Damien Pierce <emaildmp_at_yahoo.com>
Date: Mon, 13 Mar 2006 21:50:37 -0800 (PST)

Hi,

I figured out what I did that made it work.

I found that the key was I need -DCURL_STATICLIB when
compiling the source file (but not when linking it to
the curl lib(!)). I previously thought that flag was
only needed when compiling the library. (Now I don't
even know if it is necessary when compiling the
library...is it?)

So this is what works...

gcc -DCURL_STATICLIB -c -g -Icurl/include simple.c
gcc -o simple.exe simple.o -Lcurl/lib -lcurl -lws2_32
-lwinmm
Received on 2006-03-14