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 jus
With a dummy cmake project (A CMakeLists.txt with simply cmake_minimum_required(VERSION 2.8)
and add_executable(helloWorld <your hello world program>)
.), we have established that the compiler and CLion are not the problem, so it's probably something to do with make. Here was the log.
My guess is that you have msys in your path. If sh.exe
is in your path, it is known to cause problems.
As a safe alternative, you can decide to use ninja as an alternative to make (cmake supports it experimentally, but in practice it supports it pretty well). Here you can find prebuilt packages (in fact, it's just one executable you have to put in your path).
Ninja integration within CLion should work just fine.
I had a similar problem. Did you have MinGW installed before CLion?
If you only installed the C compiler with MinGW (base), there's a chance CLion is testing a non-existent C++ compiler.
You should try installing the MinGW C++ compiler from its installation manager. Or you can simply delete the C:\MinGW folder, and launch the installer again this time adding both C and C++ compilers. If it doesn't work, try re-installing CLion.
That's a quick solution that worked for me.