CLion indexer fails to resolve headers
Hi
I have a CLion C project that has the following source structure:
proj
└── src
├── components
│ ├── a
│ │ ├── a.c
│ │ └── include
│ │ └── a.h
│ └── b
│ └── include
│ └── b.h
└── examples
└── e
└── e.c
where `a.c` looks like:
#include "b/b.h"
...
and `e.c`:
#include "a/a.h"
...
The indexer seems fails to find the header files in both `a.c` and `e.c`. Do all `src/components/a/include` and `src/components/b/include` need to be explicitly specified in the CMakeLists.txt? The sources are existing and were imported into CLion.
Any advice appreciated.
Thanks
Please sign in to leave a comment.
Hi, John.
Is your project building successfully?
No, I can't. I can build it fine in Eclipse, however. The way I do it in Eclipse is outlined here https://esp-idf.readthedocs.io/en/v2.0/eclipse-setup.html I've changed compiler using the -D CMAKE_C_COMPILER and CMAKE_CXX_COMPILER options already. Before even trying to build, I can't even find any Configuration available though:
Any help would be appreciated.
Thanks
Most likely your CMake run ended up with some errors. Unfortunately, import project is not really meant for complex existing project importing. If you want to commit to the creation of the proper CMakeLists.txt, you can start by sending us the CMake output from the CMake tool window.