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

“C:\Software\CLion 2017.1.1\bin\cmake\bin\cmake.exe” -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/gcc.exe
– Check for working C compiler: C:/Software/mingw64/bin/gcc.exe – broken
CMake Error at C:/Software/CLion 2017.1.1/bin/cmake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler “C:/Software/mingw64/bin/gcc.exe” 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/mingw32-make.exe” “cmTC_9dba3/fast”
C:/Software/mingw64/bin/mingw32-make.exe -f
CMakeFiles\cmTC_9dba3.dir\build.make CMakeFiles/cmTC_9dba3.dir/build mingw32-make.exe[1]: Entering directory
‘C:/Users/让生活多一点惊喜/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_9dba3.dir/testCCompiler.c.obj
C:\Software\mingw64\bin\gcc.exe -o
CMakeFiles\cmTC_9dba3.dir\testCCompiler.c.obj -c
C:\Users\璁╃敓娲诲涓�鐐规儕鍠淺CLionProjects\myCpp\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error:
C:\Users\璁╃敓娲诲涓�鐐规儕鍠淺CLionProjects\myCpp\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c:
No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_9dba3.dir\build.make:64: recipe for target
‘CMakeFiles/cmTC_9dba3.dir/testCCompiler.c.obj’ failed
mingw32-make.exe[1]: * [CMakeFiles/cmTC_9dba3.dir/testCCompiler.c.obj]
Error 1
mingw32-make.exe[1]: Leaving directory
‘C:/Users/让生活多一点惊喜/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeTmp’
makefile:125: recipe for target ‘cmTC_9dba3/fast’ failed
mingw32-make.exe: * [cmTC_9dba3/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 “C:/Users/璁╃敓娲诲涓�鐐规儕鍠�/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeOutput.log”.
See also
“C:/Users/璁╃敓娲诲涓�鐐规儕鍠�/CLionProjects/myCpp/cmake-build-debug/CMakeFiles/CMakeError.log”.

检查项目路径是否有中文

你可能感兴趣的:(clion)