1编译 库方式.libcurl+winssl /libcurl+openssl/
一cmake : curl-7.69.0\CMake
二 vc: curl-7.69.0\projects
三Command Prompt:curl-7.69.0\winbuild
2.使用介绍:https://curl.haxx.se/libcurl/c/
3.vs2019测试代码
#include <curl/curl.h>
#include<stdio.h>
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "wldap32.lib")
#pragma comment(lib, "crypt32.lib")
#pragma comment(lib, "advapi32.lib")
#pragma comment(lib, "libcurl_a.lib")
int main(int argc, char* argv[]) {
CURL* curl = 0;
CURLcode res;
curl = curl_easy_init();
if (curl != 0) {
curl_easy_setopt(curl, CURLOPT_URL, "https://www.baidu.com");
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
/* Perform the request, res will get the return code */
res = curl_easy_p