使用VS 编译安装
需要先安装nasm 和 perl
构建目录树如下:
- curl/projects 目录下运行 generate.bat (需要git支持)
- 执行build-openssl.bat 获取编译指令
Compiler Platform 根据自己的环境进行选择即可
VSpath :如果你的vs不是默认的C盘路径,就要指定你的VS安装路径,像我的就是D:\Program Files\Microsoft Visual Studio\2022\Enterprise"
build-openssl vc14.3 x64 release ../../openssl -VSpath "D:\Program Files\Microsoft Visual Studio\2022\Enterprise"
之后在vs中构建即可 需要重新添加包含目录等
使用vcpkg 安装
-
安装vcpkg
git clone https://github.com/microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh # Linux/macOS # 或者对于 Windows .\bootstrap-vcpkg.ba
-
安装curl
# Linux/macOS ./vcpkg install curl:x64-linux ./vcpkg install curl:x64-osx# Windows .\vcpkg install curl:x64-windows .\vcpkg install curl:x86-windows
cURL 支持多种协议和功能,可以通过特性开关启用:
./vcpkg install curl[ftp,ssh,http2]
-
集成
./vcpkg integrate install