|Re: How to index all header files in Eclipse CDT on linux? [message #1841762 is a reply to message #1841749]
||Fri, 28 May 2021 02:10
Registered: October 2012
Actually, I don't understand that header file in A/includes/A.h can be find from A/source/A.cpp file when I include it like " #include <A/A.h> ". I don't need to add "includes/ " to the path.
I don't understand it either. A/A.h doesn't exist if what you've told us is correct.
What you should add to Paths and Symbols is A/includes and B/includes
as absolute paths
and use #include <A.h> and #include <B.h>
put your project directory in Paths and Symbols and use
put A and B (recommend absolute paths) in Paths and Symbols and use
The key is that whatever is in the include (e.g., #include <X>)
has to be a legitimate file when prepending one of the include directories
That is, <some path on include path list>/X
You can have relative paths on the list
but be aware they are relative to the current directory.
The indexer and compiler are unlikely to be using the same current directory.
You also need to turn on the Managed Build settings provider after adding them.
Paths and Symbols is a shortcut to inform both the compiler and the Indexer
but the Indexer only uses the directories found in
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros, etc.
You need the Managed Build settings provider to get them on the list.
[Updated on: Sun, 30 May 2021 08:07]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01598 seconds