What compiler/debugger can I use within CLion?

CLion supports GCC and Clang compilers. This means that on Windows you can select between MinGW (or MinGW-W64) and Cygwin tool sets.

You can also use the Intel compiler, but some issues are possible since this case currently is not covered by our internal testing suite.

Note: If you are using Visual Studio for C++ development (and Visual C++ Compiler), try our ReSharper for C++.

As for the debugger, CLion includes bundled GDB 7.8 (except for Cygwin on Windows), while bundled LLDB 3.6 is available in the OS X CLion distribution package. Custom GDB 7.8.* can be selected in CLion settings as well.

 

13 comments

I've tried installing versions 4.8.5 and 4.9.3 of mingw-w64 and in each case CLion sees it as mingw 5.0.  Screenshot:

https://i.imgur.com/IGhfs6l.png

Where exactly can I get the latest version of mingw fully compatible with CLion?

Thanks

1

Actually this 'version' (4.8.5, 4.9.3) in fact represents version of GCC compiler while the version of MinGW-w64 distribution is different (5.0). That is the point which confuses many of our users since CLion currently supports MinGW-w64 distribution versions range is 3.x-4.x, so they see this warning in settings (since 5.0 doesn't fit).

However, you still can use the version that is officially not supported (5.0), just be aware the some issues are possible.

1

I installed clang/llvm on windows and CLion still asked for mingw ... it seems that CLion does not recognize clang

downloaded from http://llvm.org/releases/download.html

1

CLion uses Cygwin or MinGW on Windows. So you need to install one of this and then install clang from MinGW or Cygwin to use inside CLion (find here how to change compiler in CMake:  https://intellij-support.jetbrains.com/hc/en-us/articles/207251865-How-can-I-change-compilers-in-CLion-).

0

> As for the debugger, CLion includes bundled GDB 7.8 (except for Cygwin on Windows)

So, should I use WinGW instead of Cygwin?  I don't know which one I should install on Windows.  I mainly create c project and don't create c++ project.  Any preference to which one I should use?

0

Mark, it's up to you what to choose.
This just means that for Cygwin you have to install GDB package as well.

0

Thanks, Anastasia.  I managed to install Cygwin though the setup process only has the option to install v7.10.1 of the GNU Debugger.  I am not sure how to get v7.8 installed which is what CLion wants.. 

0

Mark: The easiest way to get a compatible compiler I've found is to install QtCreator and use the MinGW which is included in that.  Since I want QtCreator anyway this worked for me.

0

Mark, unfortunately, current CLion version doesn't support GDB 7.10 available in the latest Cygwin version. So currently you can install older Cygwin version to get GDB 7.8. Or use 7.10, though some problems exist in CLion, which we plan to get fix in the next version. Sorry for the inconvenience.

0


Thanks for the suggestion, Peter.  

Thanks, Anastasia.  I will just wait until CLion supports 7.10.  I don't have an urgent need to use gdb, actually never used it before and was going to use CLion to learn it.

 

0

Thanks, Eric. You are right - it's not supported currently because of some problems listed as subtickets here: https://youtrack.jetbrains.com/issue/CPP-6883. Feel free to follow to get the updates.

0

Please sign in to leave a comment.

Have more questions?

Submit a request