Clion dose not compile

Answered

 hi, im new with clion.

im trying to use it for the first time and im having some trouble trying to run a simple hello world program

when im trying to Run im getting this error

CMake Error at C:/Program Files/JetBrains/CLion 2017.2/bin/cmake/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:51 (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/Alon/CLionProjects/untitled/cmake-build-default/CMakeFiles/CMakeTmp

 

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_e7068/fast"

C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_e7068.dir\build.make
CMakeFiles/cmTC_e7068.dir/build

mingw32-make.exe[1]: Entering directory
'C:/Users/Alon/CLionProjects/untitled/cmake-build-default/CMakeFiles/CMakeTmp'


Building C object CMakeFiles/cmTC_e7068.dir/testCCompiler.c.obj

C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_e7068.dir\testCCompiler.c.obj -c
C:\Users\Alon\CLionProjects\untitled\cmake-build-default\CMakeFiles\CMakeTmp\testCCompiler.c


CMakeFiles\cmTC_e7068.dir\build.make:64: recipe for target
'CMakeFiles/cmTC_e7068.dir/testCCompiler.c.obj' failed

mingw32-make.exe[1]: *** [CMakeFiles/cmTC_e7068.dir/testCCompiler.c.obj]
Error 1

mingw32-make.exe[1]: Leaving directory
'C:/Users/Alon/CLionProjects/untitled/cmake-build-default/CMakeFiles/CMakeTmp'


Makefile:125: recipe for target 'cmTC_e7068/fast' failed

mingw32-make.exe: *** [cmTC_e7068/fast] Error 2

 

 

CMake will not be able to correctly generate this project.

 

help pls... someone... :)

1
1 comment

1. Sometimes PATH variable gets stale, please try restarting

2. If it doesn't help, could you please compile a simple "Hello, world" program in the MinGW terminal via `C:\MinGW\bin\gcc.exe` and see if it is successful?

3. Alternatively, uninstall your current MinGW installation and install https://nuwen.net/mingw.html instead, as it should work better

0

Please sign in to leave a comment.