3

On my Dektop and on my Surface Pro 6 CLion has stopped working and I don´t know exactly why.

That is written on my Desktop:

"C:\Program Files\JetBrains\CLion 2018.3.2\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\Alexander\Desktop\Clion\übung 
-- The C compiler identification is GNU 6.3.0 
-- Check for working C compiler: C:/MinGW/bin/gcc.exe 
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken 
CMake Error at C:/Program Files/JetBrains/CLion 2018.3.2/bin/cmake/win/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): 
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/Alexander/Desktop/Clion/übung/cmake-build-debug/CMakeFiles/CMakeTmp 

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_254a1/fast" 
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_254a1.dir\build.make CMakeFiles/cmTC_254a1.dir/build 
mingw32-make.exe[1]: Entering directory 'C:/Users/Alexander/Desktop/Clion/³bung/cmake-build-debug/CMakeFiles/CMakeTmp' 
Building C object CMakeFiles/cmTC_254a1.dir/testCCompiler.c.obj 
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_254a1.dir\testCCompiler.c.obj -c C:\Users\Alexander\Desktop\Clion\├�bung\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c 
gcc.exe: error: C:\Users\Alexander\Desktop\Clion\├�bung\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory 
gcc.exe: fatal error: no input files 
compilation terminated. 
CMakeFiles\cmTC_254a1.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_254a1.dir/testCCompiler.c.obj' failed 
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_254a1.dir/testCCompiler.c.obj] Error 1 
mingw32-make.exe[1]: Leaving directory 'C:/Users/Alexander/Desktop/Clion/³bung/cmake-build-debug/CMakeFiles/CMakeTmp' 
Makefile:120: recipe for target 'cmTC_254a1/fast' failed 
mingw32-make.exe: *** [cmTC_254a1/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/Alexander/Desktop/Clion/übung/cmake-build-debug/CMakeFiles/CMakeOutput.log". 
See also "C:/Users/Alexander/Desktop/Clion/übung/cmake-build-debug/CMakeFiles/CMakeError.log".

And for my Surface Pro 6:

"C:\Program Files\JetBrains\CLion 2018.3.2\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\Alexander\Desktop\CLion\udemy-übung-arrays 
-- The C compiler identification is GNU 7.1.0 
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-7.1.0-posix-seh-rt_v5-rev0/mingw64/bin/gcc.exe 
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-7.1.0-posix-seh-rt_v5-rev0/mingw64/bin/gcc.exe -- broken 
CMake Error at C:/Program Files/JetBrains/CLion 2018.3.2/bin/cmake/win/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): 
The C compiler

"C:/Program Files/mingw-w64/x86_64-7.1.0-posix-seh-rt_v5-rev0/mingw64/bin/gcc.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/Alexander/Desktop/CLion/udemy-übung-arrays/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command:"C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe" "cmTC_d8abd/fast" 
C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_d8abd.dir\build.make CMakeFiles/cmTC_d8abd.dir/build 
mingw32-make.exe[1]: Entering directory 'C:/Users/Alexander/Desktop/CLion/udemy-³bung-arrays/cmake-build-debug/CMakeFiles/CMakeTmp' 
Building C object CMakeFiles/cmTC_d8abd.dir/testCCompiler.c.obj 
C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\gcc.exe -o CMakeFiles\cmTC_d8abd.dir\testCCompiler.c.obj -c C:\Users\Alexander\Desktop\CLion\udemy-├�bung-arrays\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c 
gcc.exe: error: C:\Users\Alexander\Desktop\CLion\udemy-├�bung-arrays\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory 
gcc.exe: fatal error: no input files 
compilation terminated. 
CMakeFiles\cmTC_d8abd.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_d8abd.dir/testCCompiler.c.obj' failed 
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_d8abd.dir/testCCompiler.c.obj] Error 1 
mingw32-make.exe[1]: Leaving directory 'C:/Users/Alexander/Desktop/CLion/udemy-³bung-arrays/cmake-build-debug/CMakeFiles/CMakeTmp' 
Makefile:120: recipe for target 'cmTC_d8abd/fast' failed 
mingw32-make.exe: *** [cmTC_d8abd/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/Alexander/Desktop/CLion/udemy-übung-arrays/cmake-build-debug/CMakeFiles/CMakeOutput.log". 
See also "C:/Users/Alexander/Desktop/CLion/udemy-übung-arrays/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
alecander
  • 41
  • 1
  • 1
  • 3
  • Welcome to StackOverflow! Your question needs some work so the community can better help you. Take a look at [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and give it another try. – Chris Albert May 01 '19 at 17:34
  • 3
    the problem is in the file name, obviously. Something funny is happening with unicode letters there. I guess you named the folder Übung? Try calling it `exercise` instead – Antti Haapala -- Слава Україні May 01 '19 at 17:35

2 Answers2

0

Check out the previous answer to the title: How to use CMAKE in MinGW or MinGW-w64 to compile Clion:

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

The answer is: you shouldn't let sh.exe in your PATH environment variable, it's known to cause problem.

Or to use ninja as an alternative to make.

0xAA55
  • 375
  • 2
  • 12
0

Avoid special characters and spaces in paths, in your case übung is not a good idea.

GCC on Windows will not handle these paths properly.

Also I see you're using GCC 6 and 7, which are quite outdated. You can get more recent versions of MinGW-w64 GCC builds for Windows from https://winlibs.com/

Brecht Sanders
  • 6,215
  • 1
  • 16
  • 40