[英]How to install vcpkg on windows 7 64-bit?
我嘗試將一些 Linux C 代碼導入 Windows。 我使用的編輯器是 Visual Studio Code,但#include
不起作用。
可能的解決方案是安裝vcpkg來管理丟失的庫和包含文件。 我從https://github.com/microsoft/vcpkg下載了 vcpkg 安裝包。 然后我在 cmd.exe 中運行 bootstrap-vcpkg.bat。 錯誤是:
C:\study\vcpkg\vcpkg-master\toolsrc\windows-bootstrap\vcpkg.vcxproj(25,3): error MSB4019: The imported project “C:\Program Files (x86)\Microsoft Visual Studio\2019
\Community\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props” was not found. Confirm that the path “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props” declaration is correct, and that the file exists on disk.
Write-Error : Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++.
所在位置 C:\study\vcpkg\vcpkg-master\scripts\bootstrap.ps1:410 字符: 16+ Write-Error <<<< "Building vcpkg.exe failed. Please ensure you have inst
alled Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." + CategoryInfo: NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.Commands.WriteErrorCommand ScriptHalted
所在位置 C:\study\vcpkg\vcpkg-master\scripts\bootstrap.ps1:411 字符: 10 + throw <<<< + CategoryInfo : OperationStopped: (:) [], RuntimeException + FullyQualifiedErrorId : ScriptHalted
正如它所描述的,沒有找到 Microsoft.Cpp.Default.props。 所以我嘗試安裝 Visual Studio 2019 社區作為一些谷歌答案。 安裝后,我重試了上面的步驟。 但是會出現同樣的錯誤。
任何人都可以幫助解決這個問題嗎? 我想我可能會錯過一些 Visual Studio Code 的設置或包。
bootstrap-vcpkg.bat 需要visual studio 來創建vcpkg.exe。
你確定你的系統中安裝了visual studio嗎?
vcpkg 需要:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.