gpt4 book ai didi

visual-studio - CMake "failed to run MSBUILD.exe"命令错误

转载 作者:行者123 更新时间:2023-12-04 11:19:22 27 4
gpt4 key购买 nike

当我想为 opencv 3.3.0 创建 Visual Studio 15(2017) make 文件时,它给了我以下错误消息:error in configuration process, project files maybe invalid还有这些:

CMake Deprecation Warning at CMakeLists.txt:81 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:85 (cmake_policy):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:94 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Error at CMakeLists.txt:127 (project):
Failed to run MSBuild command:

MSBuild.exe

to get the value of VCTargetsPath:

我使用 Windows 10。有什么问题,我该如何解决?

最佳答案

在 CMake-gui 中:选择源和二进制文件夹并单击“配置”后,它会询问您使用哪个版本的编译器。确保您选择了正确的

例如,如果您安装了“Visual Studio 2015”并选择“Visual Studio 2017”,则会遇到“Failed to run MSBuild command:”错误。

如果您确实选择了错误的,请删除二进制文件夹或简单地使用另一个二进制文件夹 - 然后单击配置并选择正确的编译器。

关于visual-studio - CMake "failed to run MSBUILD.exe"命令错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45893623/

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