I'm trying to run CLion on windows 7 with MinGW but for some reason CMake can't compile the simple test program but when I create a simple hello world file it compiles just fine when I call the compiler directly instead of CMake.
I already tried several versions of MinGW but it makes no difference on the error. I even uninstalled my AV to see if that was the problem but once again nothing changed at all.
I have MinGW in my path and CMake as well. At first I thought it maybe was a problem with permissions on the TEMP folder but they all seem fine. I'm on an administrator account as well.
This is the error I get in CLion:
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/Jim/.clion10/system/cmake/generated/4cb6a70c/4cb6a70c/__default__/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTryCompileExec141319549/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec141319549.dir\build.make CMakeFiles/cmTryCompileExec141319549.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Jim/.clion10/system/cmake/generated/4cb6a70c/4cb6a70c/__default__/CMakeFiles/CMakeTmp'
"C:\Program Files (x86)\JetBrains\CLion 1.0\bin\cmake\bin\cmake.exe" -E cmake_progress_report C:\Users\Jim\.clion10\system\cmake\generated\4cb6a70c\4cb6a70c\__default__\CMakeFiles\CMakeTmp\CMakeFiles 1
CMakeFiles\cmTryCompileExec141319549.dir\build.make:56: recipe for target 'CMakeFiles/cmTryCompileExec141319549.dir/testCCompiler.c.obj' failed
process_begin: CreateProcess(C:\Users\Jim\AppData\Local\Temp\make68804-1.bat, C:\Users\Jim\AppData\Local\Temp\make68804-1.bat, ...) failed.
make (e=2): Het systeem kan het opgegeven bestand niet vinden.
mingw32-make.exe[1]: *** [CMakeFiles/cmTryCompileExec141319549.dir/testCCompiler.c.obj] Error 2
mingw32-make.exe[1]: Leaving directory 'C:/Users/Jim/.clion10/system/cmake/generated/4cb6a70c/4cb6a70c/__default__/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec141319549/fast' failed
mingw32-make.exe: *** [cmTryCompileExec141319549/fast] Error 2
CMake will not be able to correctly generate this project.
This is the error I get when I try to use CMake from CMD: