0

I use as the main directory one called CLionProjects, on it I have several directories. Recently I added those directories so to organize my files. I used since the first time I installed CLion a directory called "Boletin1" that it's inside the main directory, later when I created "Boletin2" (In these directories I have the projects called Ejercicio1, Ejercicio2 and so on) the problems started showing up, I get this error message: I got to make clear that the compiler problem is only on "Boletin2" directory and the one called "Boletin1" works alright.

I type the debug:

"C:\Program Files\JetBrains\Nueva carpeta\CLion 2020.2.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\usuario\Desktop\CLionProjects\Boletín2\Ejercicio1
-- The C compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/mingw64/bin/gcc.exe - broken
CMake Error at C:/Program Files/JetBrains/Nueva carpeta/CLion 2020.2.3/bin/cmake/win/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/mingw64/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/usuario/Desktop/CLionProjects/Boletín2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/mingw64/bin/mingw32-make.exe cmTC_a9874/fast && C:/mingw64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_a9874.dir\build.make CMakeFiles/cmTC_a9874.dir/build
    mingw32-make.exe[1]: Entering directory 'C:/Users/usuario/Desktop/CLionProjects/Bolet�n2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_a9874.dir/testCCompiler.c.obj
    C:\mingw64\bin\gcc.exe    -o CMakeFiles\cmTC_a9874.dir\testCCompiler.c.obj   -c C:\Users\usuario\Desktop\CLionProjects\Boletín2\Ejercicio1\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
    gcc.exe: error: C:\Users\usuario\Desktop\CLionProjects\Boletín2\Ejercicio1\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_a9874.dir\build.make:85: CMakeFiles/cmTC_a9874.dir/testCCompiler.c.obj] Error 1
    mingw32-make.exe[1]: Leaving directory 'C:/Users/usuario/Desktop/CLionProjects/Bolet�n2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeTmp'
    mingw32-make.exe: *** [Makefile:140: cmTC_a9874/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/usuario/Desktop/CLionProjects/Boletín2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/usuario/Desktop/CLionProjects/Boletín2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]

Thanks 4 the support or even reading this.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
Iago
  • 3
  • 2
  • I am not really familiar with compiling on Windows or CLion, but it looks like there are some issues with your directory name. You said you called it "Boletin", but the error message prints "Boletín". That's suspicious. To clarify: your CMakeLists are autogenerated, right? – Cedric Dec 10 '20 at 08:23
  • Have you checked other questions with the similar error message? E.g. [that 1](https://stackoverflow.com/questions/55940045/c-compiler-broken-is-not-able-to-compile-a-simple-test-program/55941909), [that 2](https://stackoverflow.com/questions/29883383/clion-errorthe-c-compiler-c-mingw-bin-gcc-exe-is-not-able-to-compile-a-simp) or [that 3](https://stackoverflow.com/questions/42682370/clion-cmake-error-while-creating-new-project). Have you tried solutions from them? Without knowing what have you tried we could only offer the same answers... – Tsyvarev Dec 10 '20 at 08:29
  • 1
    `Boletín2` looks like you have Unicode characters in your project path, mingw probably can't handle that – Alan Birtles Dec 10 '20 at 08:46

1 Answers1

0

Try to rename your directory to Boletin1 and Boletin2
REMOVE ALL ACCENTS and write it with the boring i letter, even if the spelling is then wrong in your language.
This is an encoding problem and it occurs because in this case you have 3 programs (here cmake, gcc.exe and mingw64-make.exe) that parse the same character with different results (which are Bolet�n2, Bolet├¡n2 and Boletín2).
You might also have to reset clion's cache and/or remove projects from the IDE and re-import them. It may have kept some path in cache and might try to feed them to cmake.