c++ - CMake 找不到 MSBuild.exe
问题描述
我正在尝试使用 cmake(用于 OpenGL 教程)构建 Assimp 库,但我无法使用 CMake 构建所需的文件。
CMakeOutput.txt 的结尾是:“系统是:Windows - 10.0.18362 - AMD64”
CMake GUI 给了我以下信息:
CMAKE_CONFIGURATION_TYPES:调试;发布;MinSizeRel;RelWithDebInfo
CMake Error at CMakeLists.txt:38 (PROJECT):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/9/2020 12:30:21 PM.
Project "E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "x64\Debug\".
Creating directory "x64\Debug\VCTargetsPath.tlog\".
InitializeBuildStatus:
Creating "x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
PostBuildEvent:
echo VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\
:VCEnd
'C:\Users\Sparkie' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: The command "echo VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\ [E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd" exited with code 1. [E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj]
Done Building Project "E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj" (default target) (1) ->
(PostBuildEvent target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: The command "echo VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\ [E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd" exited with code 1. [E:\Softwares\assimp-4.1.0\build\CMakeFiles\3.16.4\VCTargetsPath.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.22
Exit code: 1
Configuring incomplete, errors occurred!
See also "E:/Softwares/assimp-4.1.0/build/CMakeFiles/CMakeOutput.log".
我已经尝试为这个问题寻找解决方案大约几周了,但似乎没有任何效果。任何帮助表示赞赏。
解决方案
推荐阅读
- javascript - 单元测试检查 React 组件的顺序
- javascript - 如何从一个页面保存多个画布
- wordpress - Woocommerce 产品图片链接到外部会员链接
- java - 如果 TextView 显示特定文本,则将可见性设置为 GONE
- css - 如何在一行中居中 3 列?
- dojo - Dojo gridx 偶尔会以错误的顺序显示行
- html - 具有类内部标题的 div 将包含三个 div 元素
- r - 如何根据以下格式制作索引和拆分列
- facebook - 使用 Ionic 登录 Facebook 时未显示权限
- docker - 在 HTTPS 上运行 docker 服务