Error:The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program ?

Hi guys, I have a problem with Clion, each time I start the program, shows an error:




Error:The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/__default__0/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTryCompileExec2210879370/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec2210879370.dir\build.make CMakeFiles/cmTryCompileExec2210879370.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/__default__0/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 1.0.1\bin\cmake\bin\cmake.exe" -E cmake_progress_report "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\__default__0\CMakeFiles\CMakeTmp\CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec2210879370.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec2210879370.dir\testCCompiler.c.obj -c "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\__default__0\CMakeFiles\CMakeTmp\testCCompiler.c"
gcc.exe: error: C:\Users\Michael M+®ndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\__default__0\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTryCompileExec2210879370.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec2210879370.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec2210879370.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/__default__0/CMakeFiles/CMakeTmp'
Makefile:116: recipe for target 'cmTryCompileExec2210879370/fast' failed
mingw32-make.exe: *** [cmTryCompileExec2210879370/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration Debug
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/Debug/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTryCompileExec27581666/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec27581666.dir\build.make CMakeFiles/cmTryCompileExec27581666.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/Debug/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 1.0.1\bin\cmake\bin\cmake.exe" -E cmake_progress_report "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\Debug\CMakeFiles\CMakeTmp\CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec27581666.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec27581666.dir\testCCompiler.c.obj -c "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\Debug\CMakeFiles\CMakeTmp\testCCompiler.c"
gcc.exe: error: C:\Users\Michael M+®ndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\Debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTryCompileExec27581666.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec27581666.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec27581666.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/Debug/CMakeFiles/CMakeTmp'
Makefile:116: recipe for target 'cmTryCompileExec27581666/fast' failed
mingw32-make.exe: *** [cmTryCompileExec27581666/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration Release
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/Release/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTryCompileExec1120616906/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec1120616906.dir\build.make CMakeFiles/cmTryCompileExec1120616906.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/Release/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 1.0.1\bin\cmake\bin\cmake.exe" -E cmake_progress_report "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\Release\CMakeFiles\CMakeTmp\CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec1120616906.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec1120616906.dir\testCCompiler.c.obj -c "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\Release\CMakeFiles\CMakeTmp\testCCompiler.c"
gcc.exe: error: C:\Users\Michael M+®ndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\Release\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTryCompileExec1120616906.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec1120616906.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec1120616906.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/Release/CMakeFiles/CMakeTmp'
Makefile:116: recipe for target 'cmTryCompileExec1120616906/fast' failed
mingw32-make.exe: *** [cmTryCompileExec1120616906/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration RelWithDebInfo
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/RelWithDebInfo/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTryCompileExec2952883726/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec2952883726.dir\build.make CMakeFiles/cmTryCompileExec2952883726.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/RelWithDebInfo/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 1.0.1\bin\cmake\bin\cmake.exe" -E cmake_progress_report "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\RelWithDebInfo\CMakeFiles\CMakeTmp\CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec2952883726.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec2952883726.dir\testCCompiler.c.obj -c "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\RelWithDebInfo\CMakeFiles\CMakeTmp\testCCompiler.c"
gcc.exe: error: C:\Users\Michael M+®ndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\RelWithDebInfo\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTryCompileExec2952883726.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec2952883726.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec2952883726.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/RelWithDebInfo/CMakeFiles/CMakeTmp'
Makefile:116: recipe for target 'cmTryCompileExec2952883726/fast' failed
mingw32-make.exe: *** [cmTryCompileExec2952883726/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration MinSizeRel
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/MinSizeRel/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTryCompileExec1687239638/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec1687239638.dir\build.make CMakeFiles/cmTryCompileExec1687239638.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/MinSizeRel/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 1.0.1\bin\cmake\bin\cmake.exe" -E cmake_progress_report "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\MinSizeRel\CMakeFiles\CMakeTmp\CMakeFiles" 1
Building C object CMakeFiles/cmTryCompileExec1687239638.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec1687239638.dir\testCCompiler.c.obj -c "C:\Users\Michael Méndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\MinSizeRel\CMakeFiles\CMakeTmp\testCCompiler.c"
gcc.exe: error: C:\Users\Michael M+®ndez\.clion10\system\cmake\generated\d54c24cb\d54c24cb\MinSizeRel\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTryCompileExec1687239638.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec1687239638.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec1687239638.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Michael Méndez/.clion10/system/cmake/generated/d54c24cb/d54c24cb/MinSizeRel/CMakeFiles/CMakeTmp'
Makefile:116: recipe for target 'cmTryCompileExec1687239638/fast' failed
mingw32-make.exe: *** [cmTryCompileExec1687239638/fast] Error 2
CMake will not be able to correctly generate this project.





Any solution?

Thanks.
3 comments
Comment actions Permalink

Hi Michael.

We suppose that it's not CLion problem, but problem with using CMake + MinGW, because they don't support non-latin symbols.
To solve the problem you can
1) change use MinGW to Cygwin
or
2) сhange idea.system.path in the IDE_HOME\bin\idea.properties file so it won't contain non-latin symbols (please see https://intellij-support.jetbrains.com/entries/23358108 and https://www.jetbrains.com/idea/help/project-and-ide-settings.html for more details).

3
Comment actions Permalink
thanks for answering , 
I followed your steps and it worked , 
I can now compile ,
but when it appears to me this other error:


Screenshot_2.png

0
Comment actions Permalink

Since CMake uses the full path of the project in generated makefiles, this is exactly the same problem. Please try moving your project out of your home folder, so the path to the project does not contain 'é'.

1

Please sign in to leave a comment.