CLion: Error:The C compiler “C:/MinGW/bin/gcc.exe” is not able to compile a simple test program

后端 未结 2 511
傲寒
傲寒 2021-01-02 03:35

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

2条回答
  •  离开以前
    2021-01-02 04:37

    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.

提交回复
热议问题