Windows下安装编译OpenSSL

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 Kits\8.1\bin\x86复制rc.exe rcdll.dll 到另一个路径下C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

将出现的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\ntdll.mak;install
    Working Directory: D:/vcpkg/buildtrees/openssl/x86-windows-rel/openssl-1.0.2o
    See logs for more information:
      D:\vcpkg\buildtrees\openssl\build-x86-windows-rel-1-out.log
      D:\vcpkg\buildtrees\openssl\build-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错误分析方法编译中各种错误,结果无变化。。先到这吧

posted @ 2021-03-29 12:08  一个李长兴  阅读(1343)  评论(0编辑  收藏  举报