Load project
CLion SOP: index SRS using configure + Makefiles (WSL)
I spent several hours trying to get CLion indexing working with trunk/compile_commands.json. Even after adjusting -I include paths and regenerating/running on WSL native, symbol resolution still didn’t work. In the end, the reliable fix was to switch to Makefile project loading generated by the configure script and it works fine.
Steps
-
Generate Makefiles
- Run
configureso it produces the parent Makefile undertrunk/.
- Run
-
Reset CLion project metadata
- Delete
trunk/.idea/if it exists.
- Delete
-
Recreate the CLion project
- Close the project.
- Remove the old CLion project files in
trunk/.
-
Open the project correctly
- Open CLion with the
trunk/folder (where the parent Makefile lives). - Load as a Makefile project.
- Open CLion with the
-
Let CLion clean/reload
- When prompted, choose Clean/Reload.
-
Verify
- Use CLion’s Build tools to confirm the Makefile project model is loaded.
- Symbols and “Go to definition” should work normally.
