使用CMake生成解决方案后构建INSTALL报错

错误 1 error MSB3073: 命令“setlocal
"D:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd”已退出,代码为 1。 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 132 5 INSTALL

报错类型一般如上所述,原因是因为VS没有以管理员身份运行,在路径C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv下找到VSLauncher.exe,右键→属性→兼容性→勾选以管理员身份运行;

猜你喜欢

转载自www.cnblogs.com/canyeweiwei/p/10639282.html