69,382
社区成员
发帖
与我相关
我的任务
分享
#define CURL_STATICLIB
#include "curl/curl.h"
#pragma comment ( lib, "../lib/libcurl.lib" )
#pragma comment ( lib, "ws2_32.lib" )
#pragma comment ( lib, "winmm.lib" )
#pragma comment ( lib, "wldap32.lib" )
int main()
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.baidu.com");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}