gpt4 book ai didi

visual-studio - Visual Studio 2017 : vcvars for toolset v140

转载 作者:行者123 更新时间:2023-12-03 17:35:26 25 4
gpt4 key购买 nike

我安装了 Visual Studio 2017 和工具集 v140v141 .与 v140 合作工具集,我需要通过 vcvars 设置必要的环境.但是,运行必要的 vcvars ,我收到各种错误。我正在服用 vcvars从这个目录 - C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\VC - 因为我需要使用 v140 启动工作环境工具集。

如果我运行 vcvarsall ,例如,然后 vcvarsall.bat x86vcvarsall.bat x86_amd64 - 我收到以下错误:

Error in script usage. The correct usage is:

vcvarsall.bat [option] or
vcvarsall.bat [option] store or
vcvarsall.bat [option] [version number] or
vcvarsall.bat [option] store [version number]

where [option] is: x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | >amd64_arm
where [version number] is either the full Windows 10 SDK version number or "8.1" to use the windows 8.1 SDK

: The store parameter sets environment variables to support store (rather than desktop) development. :

For example:

vcvarsall.bat x86_amd64
vcvarsall.bat x86_arm store
vcvarsall.bat x86_amd64 10.0.10240.0
vcvarsall.bat x86_arm store 10.0.10240.0
vcvarsall.bat x64 8.1
vcvarsall.bat x64 store 8.1 :

Please make sure either Visual Studio or C++ Build SKU is installed.



如果我运行特定文件 vcvars ,例如, vcvars32.bat ,然后我收到另一个错误:

ERROR: Cannot determine the location of the VS Common Tools folder.



有没有人遇到同样的问题,你能帮忙吗?
谢谢你。

最佳答案

我已经设法使用以下方法解决了这个问题。对于工具集 v140 vcvars尝试从注册表(Visual Studio 14.0 安装目录)获取所需的数据,但是,因为它没有这样做,所以退出并出现错误。如果您将所需的值添加到 Windows 注册表,vcvars将正常工作。如果是工具集 v140与 Visual Studio 2017 一起安装,此默认安装路径为 C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\ .

您需要找到设置 Visual Studio 2017 安装目录的现有 key (在我的情况下是 HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7 )并添加名称为 14.0 且值为 C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\ 的 key 。

关于visual-studio - Visual Studio 2017 : vcvars for toolset v140,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43939301/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com