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_perform(curl);
/* Check for errors */
if (res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
}
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
-----------------------------------------------------------
参考文献
-----------
6.https://www.cnblogs.com/chenyangchun/p/6868102.html
8.https://www.pianshen.com/article/5238709511/
9.https://www.cnblogs.com/zzugyl/p/5037152.html
10.https://www.cnblogs.com/zzugyl/p/5037152.html
---------------------
库相关问题介绍
1.https://www.cnblogs.com/zdf123/p/11290218.html
--------------------------------------------------------------
直接使用bin
2.https://blog.jjonline.cn/otherarticle/146.html
--------------------
使用库