Issue (?) with compile_commands.json on big projects
Completed
Hello! I am utterly new to the CLion, so I may be doing something wrong here :)
I am part of a project with a huge codebase and I wanted to import it into CLion using the project's compile_commands.json. I work on a tiny component on it, that makes use of other external components on this huge file tree.
When I hover over an include file or an external component's function call and CTRL+B it, I get "Cannot find declaration to go to", unless if the probed line resides in the same folder.
A few behaviors I observe:
- When loading the compile_commands.json, I get some "Found several command objects for file:": that is because it is an Integrity based project, with multiple address spaces on the same project;
- I also get "Cannot determine compiler type by executable file:": not sure why it doesn't understand integrity compilers (ccintarm64.exe and cxintarm64.exe);
- Codebase and compile_commands.json reside in different folders;
- According to https://www.jetbrains.com/help/clion/compilation-database.html#compdb_load , when loading the compile_commands.json, it should be expected that files should be visible. When I try to access the source code files, by CTRL+SHIFT+N, I can only find object files (i.e., *.o). The source code is only reachable after I change the root.
- According to https://www.jetbrains.com/help/clion/compilation-database.html#compdb_recompile , when I go into a file, I should be able to recompile it, but this option is grayed out.
So, am I doing something wrong here?
Please sign in to leave a comment.
The problem was caused by the fact that CLion doesn't yet support the Green Hills compiler - https://youtrack.jetbrains.com/issue/CPP-11656.