Clion新建项目报错

  • Post author:
  • Post category:其他


系统:Windows10

环境:MinGW

新建项目结果报错

"D:\Program Files\IDEA\apps\CLion\ch-0\203.7717.62\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" D:\软件学习\C
-- The C compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/gcc.exe - broken
CMake Error at D:/Program Files/IDEA/apps/CLion/ch-0/203.7717.62/bin/cmake/win/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: D:/杞欢瀛︿範/C/cmake-build-debug/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/PROGRA~1/MINGW-~1/X86_64~1.0-W/mingw64/bin/mingw32-make.exe cmTC_9e51d/fast && C:/PROGRA~1/MINGW-~1/X86_64~1.0-W/mingw64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_9e51d.dir\build.make CMakeFiles/cmTC_9e51d.dir/build
    mingw32-make.exe[1]: Entering directory 'D:/杞欢瀛︿範/C/cmake-build-debug/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_9e51d.dir/testCCompiler.c.obj
    C:\PROGRA~1\MINGW-~1\X86_64~1.0-W\mingw64\bin\gcc.exe    -o CMakeFiles\cmTC_9e51d.dir\testCCompiler.c.obj   -c D:\鏉烆垯娆㈢�涳缚绡刓C\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
    gcc.exe: error: D:\鏉烆垯娆㈢�涳缚绡刓C\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
    gcc.exe: fatal error: no input files
    compilation terminated.
    mingw32-make.exe[1]: *** [CMakeFiles\cmTC_9e51d.dir\build.make:85: CMakeFiles/cmTC_9e51d.dir/testCCompiler.c.obj] Error 1
    mingw32-make.exe[1]: Leaving directory 'D:/杞欢瀛︿範/C/cmake-build-debug/CMakeFiles/CMakeTmp'
    mingw32-make.exe: *** [Makefile:140: cmTC_9e51d/fast] Error 2
    
    

  

  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 "D:/杞欢瀛︿範/C/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "D:/杞欢瀛︿範/C/cmake-build-debug/CMakeFiles/CMakeError.log".

[无法重新加载]

原因:

项目目录中存在中文



版权声明:本文为tanhuiong原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。