[英]Error: C compiler "C:/Program Files..." is not able to compile a simple test program
我正在努力從源代碼安裝 Carla 並且已經安裝了虛幻引擎。 當我嘗試使用make Python API命令構建 CARLA 時,出現如下錯誤
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
可能是什么問題?
我得到了答案並在這里分享。 以為有人需要它。
檢查 gnuwin make 的安裝文件夾中是否有任何空間。
例如: gnuwin make 最初安裝在目錄 C:\Program Files\GnuWin32\bin 中,由於 Program 和 files 之間有空格,所以錯誤就來了。
作為解決方法,將 gnuwin make 安裝在沒有空格的目錄中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.