【发布时间】:2022-11-30 23:55:30
【问题描述】:
我正在努力从源代码安装 Carla 并且已经安装了虚幻引擎。当我尝试使用制作 Python API命令,我收到一个错误
C 编译器“C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe” 无法编译简单的测试程序
特此附上来自 x64 Native Tools 命令提示符的完整行
d:\Test\resimulation2>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:\Test\resimulation2\Build\" -[Setup]: Creating "d:\Test\resimulation2\Build\" folder... -[Setup]: Installing zlib... -[install_zlib]: [Batch params]: --build-dir "d:\Test\resimulation2\Build\" -[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:\Test\resimulation2\Build\zlib-source\build" 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_2e0d7\fast && C:\Program Files\GnuWin32\bin\make.exe -f CMakeFiles\cmTC_2e0d7.dir\build.make /nologo -L CMakeFiles\cmTC_2e0d7.dir\build 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可能是什么问题?
【问题讨论】:
-
看起来您尝试构建的任何内容都无法正确处理文件名中的空格。看起来 make 在带空格的路径上是主要问题
-
nmake构建行被错误引用。 -
文件路径中的空格,在 Program Files 中安装 GnuWin 可能是个坏主意
-
@RonyShaji 这似乎是制作
C:\Program Files\GnuWin32\bin\make.exe的路径。 -
@drescherjm 谢谢伙伴。您在另一个文件夹中安装的解决方案有效。所以看起来这是空间的问题。
标签: c++ cmake makefile compiler-errors carla