C++ curl库 源码编译及使用(VS2019)
source link: https://blog.csdn.net/xray2/article/details/120496410
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
C++ curl库 源码编译及使用(VS2019)
官网下载源码:
使用 cmake 界面版生成VS2019解决方案
选择Win32: 32位,x64: 64位,默认64位
如果需要支持https协议,需要勾选 CMAKE_USE_OPENSSL
再设置OpenSSL头文件和lib位置。(注意之前选择的如果是32位,这里需要选择32位的lib,64位选择64位lib。)
关于OpenSSL编译,参看:
https://blog.csdn.net/xray2/article/details/120497146
打开生成的解决方案 CURL.sln
生成动态库,注意选择需要的版本(debug/release)和平台(x64/x86)
需要用到的头文件
lib文件和dll文件
运行结果:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK