我在编译CGAL时遇到问题我按照这里的步骤进行操作:http://www.cse.msu.edu/~ytong/CGAL_installation.ppt我使用VS2013,cgal 4.9.1,BOOST 1.59.0,Qt5.7.1
但是当我到达构建INSTALL .sln步骤时,它会显示以下错误:
Error 1 error MSB3073: The command "setlocal
"C:\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" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 132 5 INSTALL
输出消息:
1>------ Rebuild All started: Project: INSTALL, Configuration: Debug Win32 ------
1> -- Install configuration: "Debug"
1> -- Up-to-date: C:/Program Files (x86)/CGAL/share/doc/CGAL-4.9.1/AUTHORS
1> -- Up-to-date: C:/Program Files (x86)/CGAL/share/doc/CGAL-4.9.1/CHANGES
1> CMake Error at cmake_install.cmake:39 (file):
1> file INSTALL cannot set permissions on "C:/Program Files
1> (x86)/CGAL/share/doc/CGAL-4.9.1/CHANGES"
1>
1>
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: The command "setlocal
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :cmEnd
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :cmErrorLevel
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: exit /b %1
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :cmDone
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :VCEnd" exited with code 1.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
有什么帮助吗?
答案 0 :(得分:1)
文件INSTALL无法设置“C:/ Program Files
”的权限
构建INSTALL目标必须在Program Files目录中创建文件,这需要提升权限。
解决方案是在执行INSTALL构建时以管理员身份运行Visual Studio。