繁体   English   中英

错误:C 编译器“C:/Program Files...”无法编译简单的测试程序

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM