Hang_kon 2022-09-07 21:03 采纳率: 100%
浏览 43
已结题

无法运行c语言,环境有问题,如何解决?

问题如标题

debug

C:\Users\空神\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\222.3739.54\bin\cmake\win\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/ninja/win/ninja.exe -G Ninja -S C:\Users\空神\Desktop\CCC -B C:\Users\空神\Desktop\CCC\cmake-build-debug
-- The C compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/mingw/bin/gcc.exe
-- Check for working C compiler: C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/mingw/bin/gcc.exe - broken
CMake Error at C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/cmake/win/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/mingw/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/空神/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/ninja/win/ninja.exe cmTC_600a8 && ninja: error: 'C:/Users/绌虹/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c', needed by 'CMakeFiles/cmTC_600a8.dir/testCCompiler.c.obj', missing and no known rule to make it
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Users/空神/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/空神/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeError.log".

[已完成]

CMakeOutput.log

The system is: Windows - 10.0.22000 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/mingw/bin/gcc.exe 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/Users/空神/Desktop/CCC/cmake-build-debug/CMakeFiles/3.23.2/CompilerIdC/a.exe"

CMakeError.log


Detecting C compiler ABI info failed to compile with the following output:
Change Dir: C:/Users/空神/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/ninja/win/ninja.exe cmTC_4c03c && ninja: error: 'C:/Users/绌虹/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/cmake/win/share/cmake-3.23/Modules/CMakeCCompilerABI.c', needed by 'CMakeFiles/cmTC_4c03c.dir/CMakeCCompilerABI.c.obj', missing and no known rule to make it




Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/空神/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/空神/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.3739.54/bin/ninja/win/ninja.exe cmTC_600a8 && ninja: error: 'C:/Users/绌虹/Desktop/CCC/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c', needed by 'CMakeFiles/cmTC_600a8.dir/testCCompiler.c.obj', missing and no known rule to make it
  • 写回答

1条回答 默认 最新

  • _GX_ 2022-09-07 21:28
    关注

    你的gcc有问题,也许是你的用户名是中文的原因,你把gcc安装到都是英文目录下面试试。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 3月7日
  • 已采纳回答 2月28日
  • 创建了问题 9月7日

悬赏问题

  • ¥15 R语言卸载之后无法重装,显示电脑存在下载某些较大二进制文件行为,怎么办
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?
  • ¥15 关于#vue.js#的问题:修改用户信息功能图片无法回显,数据库中只存了一张图片(相关搜索:字符串)
  • ¥15 texstudio的问题,
  • ¥15 spaceclaim模型变灰色
  • ¥15 求一份华为esight平台V300R009C00SPC200这个型号的api接口文档
  • ¥15 字符串比较代码的漏洞
  • ¥15 欧拉系统opt目录空间使用100%
  • ¥15 ul做导航栏格式不对怎么改?