Windows下安装并编译OpenSSL
状态:未解决
参考谭杰同学发现的Win10安装配置VS2019OpenSSL,仍不能识别openssl库,看到VS中头文件推荐用vcpkg安装openSSL库
安装vcpkg
参考 vs2019 + vcpkg (C++第三方包配置工具)
先从码云上下载安装包yao_yu_qq / vcpkg
然后点击运行bootstrap-vcpkg.bat
安装时出现LINK : fatal error LNK1158: cannot run 'rc.exe' 错误,参考win10 安装scrapy 出现LINK : fatal error LNK1158: cannot run 'rc.exe' 错误的解决办法,从C:Program Files (x86)Windows Kits8.1inx86复制rc.exe rcdll.dll 到另一个路径下C:Program Files (x86)Microsoft Visual Studio 14.0VCin
将出现的vcpkg.exe所在文件夹放入环境变量
安装OpenSSL
cmd输入 vcpkg install openssl:x86-windows
安装openssl包
安装7-zip时报错,参考
VCPKG在安装库(7zip)时 “ File does not have expected hash:”
更改xml文件
安装openssl报错,参考VCPKG在安装库时 “ File does not have expected hash:”,在port/openssl中修改portfile.cmake文件里的SHA256值
cmake报错如下
e):
Command failed: nmake;-f;ms
tdll.mak;install
Working Directory: D:/vcpkg/buildtrees/openssl/x86-windows-rel/openssl-1.0.2o
See logs for more information:
D:vcpkguildtreesopenssluild-x86-windows-rel-1-out.log
D:vcpkguildtreesopenssluild-x86-windows-rel-1-err.log
Call Stack (most recent call first):
ports/openssl/portfile.cmake:93 (vcpkg_execute_required_process)
scripts/ports.cmake:72 (include)
Error: Building package openssl:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: openssl:x86-windows
Vcpkg version: 0.0.112-nohash
Additionally, attach any relevant sections from the log files above.
参考SCons-无法将“ rc”识别为内部或外部命令,可操作程序或批处理文件和vcpkg错误分析方法和编译中各种错误,结果无变化。。先到这吧