CMake error?

After I installed MinGW and set my toolchain on CLion if I try to compile anything it gives this error:

CMake Error at C:/Program Files/JetBrains/CLion 2017.3.3/bin/cmake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "C:/Users/Gytis1/MinGW/bin/gcc.exe" is not able to compile a
  simple test program.
  It fails with the following output:
   Change Dir: C:/Users/Gytis1/CLionProjects/test/cmake-build-debug/CMakeFiles/CMakeTmp
 
  Run Build Command:"C:/Users/Gytis1/MinGW/bin/mingw32-make.exe"
  "cmTC_1044d/fast"
  C:/Users/Gytis1/MinGW/bin/mingw32-make.exe -f
  CMakeFiles\cmTC_1044d.dir\build.make CMakeFiles/cmTC_1044d.dir/build
  mingw32-make.exe[1]: Entering directory
  'C:/Users/Gytis1/CLionProjects/test/cmake-build-debug/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_1044d.dir/testCCompiler.c.obj
  C:\Users\Gytis1\MinGW\bin\gcc.exe -o
  CMakeFiles\cmTC_1044d.dir\testCCompiler.c.obj -c
  C:\Users\Gytis1\CLionProjects\test\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c

  CMakeFiles\cmTC_1044d.dir\build.make:64: recipe for target
  'CMakeFiles/cmTC_1044d.dir/testCCompiler.c.obj' failed
  mingw32-make.exe[1]: *** [CMakeFiles/cmTC_1044d.dir/testCCompiler.c.obj]
  Error 1
  mingw32-make.exe[1]: Leaving directory
  'C:/Users/Gytis1/CLionProjects/test/cmake-build-debug/CMakeFiles/CMakeTmp'

  Makefile:125: recipe for target 'cmTC_1044d/fast' failed
  mingw32-make.exe: *** [cmTC_1044d/fast] Error 2
 
 
  CMake will not be able to correctly generate this project.
 
Please help
1
3 comments

Hi! Have you installed all required packages (please see our web-help article)? Please also show the screenshot of File | Settings | Build, Execution, Deployment | Toolchains.

0
Avatar
Permanently deleted user

Yes I did everything that was in that tutorial

0

Do you have CMakeOutput.log and CMakeError.log files in the cmake-build-debug/CMakeFiles subfolder of you project? If yes, please send these files to clion-support at jetbrains.com.

0

Please sign in to leave a comment.