CLion 新建c++项目报错解决方法

时间:2025-03-27 08:05:38
“C:\Software\CLion 2017.1.1\bin\cmake\bin\” -DCMAKE_BUILD_TYPE=Debug -G “CodeBlocks - MinGW Makefiles” C:\Users\让生活多一点惊喜\CLionProjects\myCpp
– The C compiler identification is GNU 4.9.2
– The CXX compiler identification is GNU 4.9.2
Check for working C compiler: C:/Software/mingw64/bin/
– Check for working C compiler: C:/Software/mingw64/bin/ – broken
CMake Error at C:/Software/CLion 2017.1.1/bin/cmake/share/cmake-3.7/Modules/:51 (message):
The C compiler “C:/Software/mingw64/bin/” is not able to compile a
simple test program.
It fails with the following output:
Change Dir: C:/Users/璁╃敓娲诲涓�鐐规儕鍠�/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command:”C:/Software/mingw64/bin/” “cmTC_9dba3/fast”
C:/Software/mingw64/bin/ -f
CMakeFiles\cmTC_9dba3.dir\ CMakeFiles/cmTC_9dba3.dir/build [1]: Entering directory
‘C:/Users/让生活多一点惊喜/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_9dba3.dir/
C:\Software\mingw64\bin\ -o
CMakeFiles\cmTC_9dba3.dir\ -c
C:\Users\璁╃敓娲诲涓�鐐规儕鍠淺CLionProjects\myCpp\cmake-build-debug\CMakeFiles\CMakeTmp\
: error:
C:\Users\璁╃敓娲诲涓�鐐规儕鍠淺CLionProjects\myCpp\cmake-build-debug\CMakeFiles\CMakeTmp\:
No such file or directory
: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_9dba3.dir\:64: recipe for target
‘CMakeFiles/cmTC_9dba3.dir/’ failed
[1]: * [CMakeFiles/cmTC_9dba3.dir/]
Error 1
[1]: Leaving directory
‘C:/Users/让生活多一点惊喜/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeTmp’
makefile:125: recipe for target ‘cmTC_9dba3/fast’ failed
: * [cmTC_9dba3/fast] Error 2