下载Libcurl(libcurl-7.18.0-win32-msvc.zip)
http://curl.haxx.se/latest.cgi?curl=win32-devel-msvc
http://www.cnblogs.com/moodlxs/archive/2012/10/15/2724318.html
以下仅针对静态lib的curl:
1.如果是vs2008下,要把curlib编译成/MTD 和/MT的,默认vc6下编译的是/MDd和/MD
否则报LNK2005
2.加入宏BUILDING_LIBCURL或CURL_STATICLIB
#if defined(DEBUG)||defined(_DEBUG) #pragma comment(lib, "libcurld.lib") #else #pragma comment(lib, "libcurl.lib") #endif #pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "winmm.lib") #pragma comment(lib, "wldap32.lib")
否则报LNK2001
很多时候,你需要去取curl的版本
1.进入它的下载页面http://curl.haxx.se/download.html
2.Source Archives下下载有四个文件包:
如:
Source Archives
curl 7.32.0, Released on the 12th of August 2013.
curl-7.32.0.tar.gz ( gpg) ( mirror) ( metalink)
curl-7.32.0.tar.bz2 ( gpg) ( mirror) ( metalink)
curl-7.32.0.zip ( gpg) ( mirror) ( metalink)
curl-7.32.0.tar.lzma ( gpg) ( mirror) ( metalink)
直接下载curl-7.32.0.zip (gpg) (mirror) (metalink) 即可,自带了vc6工程,你可以手动编成自己需要的lib