1,編譯curl爲static庫curl
2,從新創建一個testcurl控制檯程序測試
#include "stdafx.h" #include <Windows.h> #include "curl/curl.h" #pragma comment(lib, "libcurl.lib") #pragma comment(lib, "wldap32.lib") #pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "winmm.lib") int _tmain(int argc, _TCHAR* argv[]) { CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://2345.com/?kduba"); res = curl_easy_perform(curl); curl_easy_cleanup(curl); } getchar(); return 0; }