使用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,右鍵→屬性→兼容性→勾選以管理員身份運行;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM