Want to use curl to do the rest of the client. So I studied this stuff.
1: Install MinGW
Why use MinGW, small, must vs fast, gcc know more,
Http://tdm-gcc.tdragon.net/download, here according to different platforms to choose a different version, I downloaded the Tdm64-gcc-4.9.2-3.exe
2: Compiling Libcurl
Download the Curl source file, unzip and enter the Curl-7.41.0\lib directory to execute mingw32-make-f makefile.m32; after execution, the LIBCURL.A file will be generated under LIB.
3: Prepare a curl example file to compile.
d:\dev>g++-id:/dev/curl/include/curl-ld:/dev/curl/lib main.c-lcurl-lwldap32-lws2_32-dcurl_staticlib
This piece is important:
wLDAP,ws2_32 This even a must add, one is LADP library, one is the network library.
-dcurl_staticlib a static library that uses Curl is LIBCURL.A
MinGW is very useful.
MinGW and Libcurl