How to run C language code on JetBrains CLion
Solution 1
To elaborate on the answer provided by "uta" you need either MinGW or Cygwin in order to compile your code. MinGW can be obtained from here: MinGW
Or Cygwin from here: Cygwin
For simplicity I will describe MinGW. Install MinGW then navigate like so in CLion:
File -> Settings -> Build, Execution, Deployment -> Toolchains
And select the directory you have MinGW installed. I believe by default on Windows it's C:\MinGW. Once you've done this CLion will scan the directory and detect it.
If you already have them installed then you need only select the folders they're installed in in CLion.
Hope this helps.
Solution 2
Please, start from menu: File | Settings... | Build, Execution,... | Toolchains | Environment:
Ramin Farajpour Cami
Updated on June 12, 2022Comments
-
Ramin Farajpour Cami about 2 years
I get the following error :
Error:Neither MinGW nor Cygwin is selected
Do you have idea for resolve this issue?
-
Sergei Krivonos over 7 yearsHow about MSVC? Isn't supported?
-
uta over 7 yearsSorry, but currently CLion is not working with MS compiler. Mostly because MS compiler is not providing preprocessor info extraction. intellij-support.jetbrains.com/hc/en-us/articles/…
-
Razakhel about 7 yearsCLion now supports MSVC with its last version: blog.jetbrains.com/clion/2017/03/clion-2017-1-released/#msvc. It is currently marked as unstable and debugger isn't supported, but it seems to work fine.