cURL / Mailing Lists / curl-library / Single Mail


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

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


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 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
Received on 2006-03-14