How to enable syntax error detection for C in CLions?


I'm very new to both C and CLions. I want the red error lines to appear when typing, but currently it looks like this.

I can't get the red lines to appear under these clearly invalid syntaxes. I've also tried this support site :

but it doesn't contain what I need.



On what build system is your project based? How did you create it? How did you open it in CLion?


My system is the current Windows 10. I pulled this from a git repository by cloning the git file into my files, then opening with CLions using "Open file" then navigating to the file.


For code insight features to work CLion requires a project model to be properly loaded. In other words, smart code features doesn't work for a separately open file. They work for projects of one of the following formats:

The easiest way to start is the following: `File | Close Project`, select `New Project` on the Welcome screen > `C++ Executable` > `Create`. After that you can copy the necessary code and past it into this project. Or you can past your .сpp files into the created project's folder and add them to the target in the CMakeLists.txt (


I'm not sure I understand what to do for the last part. There is lots of files so it won't be possible to copy paste, and I also need it to be in the same git file since I need to commit and push it back to git. 

The link doesn't tell me what to do in the case that I already have files. I want to just enable syntax checker in this folder rather than create a new one. 


 >I want to just enable syntax checker in this folder

There is no way to do that. As I told you already, code insight features work properly only if the project model is properly configured. For now, only CMake, Makefile, Compilation Database and Gradle are supported. 

On what build system is your project based?


I too am having this same issue as well. I am on a windows 10 build and I opened an existing project with CMakeList.txt. However, I am unable to view syntax errors. 


Lando Shepherd please do `Tools | CMake | Reset Cache and Reload Project`. Do you see any errors in the CMake tool window?


Please sign in to leave a comment.