我正在努力从源代码安装卡拉,并已经安装了虚幻引擎。当我尝试使用构建CARLA时,使Python API命令,我得到一个错误
C编译器"C:/Program Files (x86)/Microsoft Visual工作室/2019/社区/VC/工具/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"无法编译一个简单的测试程序
下面附上来自x64 Native Tools命令提示符
的完整行d:Testresimulation2>make PythonAPI
-[Setup]: [Batch params]: --boost-toolset msvc-14.2 --all
-[Setup]: Asynchronous jobs: 8
-[Setup]: Boost toolset: msvc-14.2
-[Setup]: Install directory: "d:Testresimulation2Build"
-[Setup]: Creating "d:Testresimulation2Build" folder...
-[Setup]: Installing zlib...
-[install_zlib]: [Batch params]: --build-dir "d:Testresimulation2Build"
-[install_zlib]: Retrieving zlib.
-[install_zlib]: Extracting zlib from "zlib-1.2.13.zip".
-[install_zlib]: Removing "zlib-1.2.13.zip"
-[install_zlib]: Creating "d:Testresimulation2Buildzlib-sourcebuild"
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/Test/resimulation2/Build/zlib-source/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake -f Makefile /nologo cmTC_2e0d7fast && C:Program FilesGnuWin32binmake.exe -f CMakeFilescmTC_2e0d7.dirbuild.make /nologo -L CMakeFilescmTC_2e0d7.dirbuild
Der Befehl "C:Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
NMAKE : fatal error U1077: 'C:Program' : return code '0x1'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Configuring incomplete, errors occurred!
See also "D:/Test/resimulation2/Build/zlib-source/build/CMakeFiles/CMakeOutput.log".
See also "D:/Test/resimulation2/Build/zlib-source/build/CMakeFiles/CMakeError.log".
-[install_zlib]: [CMAKE ERROR] An error ocurred while executing cmake command.
-[install_zlib]: [CMAKE ERROR] Possible causes:
-[install_zlib]: - Make sure "CMake" is installed.
-[install_zlib]: - Make sure it is available on your Windows "path".
-[install_zlib]: - Make sure you have cmake 3.12.4 or higher installed.
-[install_zlib]: Exiting with error...
-[Setup]:
Ok, and error ocurred, don't panic!
We have different platforms where you can find some help :)
- Make sure you have read the documentation:
http://carla.readthedocs.io/en/latest/how_to_build_on_windows/
- If the problem persists, you can ask on our Github's "Building on Windows" issue:
https://github.com/carla-simulator/carla/issues/21
- Or just use our Discord channel!
We'll be glad to help you there :)
https://discord.gg/42KJdRj
make: *** [setup] Fehler 1
可能是什么问题?
我得到了答案并在这里分享。我想有人需要它。
检查gnuwin make的安装文件夹中是否有空格。
例如:gnuwin make首先安装在C:Program FilesGnuWin32bin目录中,由于Program和files之间有一个空格,因此出现错误。
作为一种解决方法,在没有空格的目录下安装gnuwin make。