记录一下使用vcpkg安装osg途中遇到的问题
在cmd执行命令vcpkg install osg:x64-windows gdal:x64-windows curl:x64-windows
出现的问题
-- Downloading https://github.com/openssl/openssl/archive/openssl-3.2.1.tar.gz -> openssl-openssl-openssl-3.2.1.tar.gz...
-- Cleaning sources at E:/vcpkg/buildtrees/openssl/src/nssl-3.2.1-385ff0b09c.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/vcpkg/downloads/openssl-openssl-openssl-3.2.1.tar.gz
-- Applying patch command-line-length.patch
-- Applying patch script-prefix.patch
-- Applying patch windows/install-layout.patch
-- Applying patch windows/install-pdbs.patch
-- Applying patch unix/android-cc.patch
-- Applying patch unix/move-openssldir.patch
-- Applying patch unix/no-empty-dirs.patch
-- Applying patch unix/no-static-libs-for-shared.patch
-- Using source at E:/vcpkg/buildtrees/openssl/src/nssl-3.2.1-385ff0b09c.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Getting CMake variables for x64-windows
-- Prerunning x64-windows-dbg
-- Building x64-windows-dbg
-- Restarting build without parallelism
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: "F:/visual studio/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/nmake.exe" /NOLOGO /G /U /F makefile install_dev install_modules INSTALL_PDBS=ON
Working Directory: E:/vcpkg/buildtrees/openssl/x64-windows-dbg
See logs for more information:
E:\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-out.log
E:\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_nmake.cmake:156 (vcpkg_execute_build_process)
ports/openssl/windows/portfile.cmake:74 (vcpkg_build_nmake)
ports/openssl/portfile.cmake:75 (include)
scripts/ports.cmake:175 (include)
出现这种情况,先检查一下vcpkg是不是最新,一些关于openssl的问题在最新版本得到了修复
使用git pull,然后执行执行 bootstrap-vcpkg.bat
然后检查Visual Studio,很简单的问题却卡了我两天,如果Visual Studio安装的路径有空格,重新安装删除路径中的空格,重装路径最好不要有中文!(我第一次重装的时候没注意,再重装了一次)
注意重装Visual Studio时记得勾选英语语言包