cmakefileclion

CLion can't see context in c makefile project


No highlighting, no errors, no hints. Even NULL has not it's highlighting. The project compiles with Makefile perfectly, no errors seen. Check.h library is unknown for CLion even it clearly installed in WSL. Repair IDE button doesn't work, context not shown in right-bottom corner. Invalidate Caches And Restart also with no result. Removing .idea folder didn't help. Removing project and clone it again also didn't help. Mark as Directory src folder is also not working.


Solution

  • All you need to do is:

    1. Reclone your repository (optional, because you could make project worse with your actions)
    2. Mark src folder with: Right click on folder → Mark Directory as in context menu → Project Source and Headers
    3. Compile standalone file with main function like this:
      Compilung standalone file

    After compiling, you will see a lot of error and CLion will see project context.