I am using Eclipse CDT v4.3.2 from the ARM DS-5 v5.20.0 package to develop code and debug the Makefile project.
The make file is actually a hierarchy of mkefiles that create multiple targets in multiple configurations based on command line options.
To provide effective static analysis, I use the settings for the Paths and Symbols project to help Indexer find the various include files and highlight the necessary conditionally compiled code segments.
Our project contains a header file, which is included in many modules in the code tree. However, two variants of the header file are present in two neighboring directories, for conditional use with two assembly configurations:
My_Project | +-- Include_1 | | | +-- header.h | +-- Include_2 | | | +-- header.h | +-- Source | | | +-- module_1.c | +-- makefile
The two options are mostly similar, but contain some differences. These headers contain several macro definitions and an enum erated typedef . In particular, the following parts of the samples are identical in both versions:
// header.h
A typical code module includes one of these headers, depending on the configuration in the makefile, and contains references to SYMBOL and constant .
On the Paths and Symbols tab, I added only the My_Project/Include_1 list to the path list, so the My_Project/Include_1 should not be confused. I also turned off the Allow heuristic resolution of includes parameter in the menu Window β Preferences β C/C++ β Indexer (in fact, I turned off all the parameters of the indexer).
With all this, when I open the module.c file in the editor, the links to constant are marked with a wavy red underline and the Symbol 'constant' could not be resolved error is indicated. At the same time, references to SYMBOL have no error indications.
When I rename one of the header files to header_x.h , then the error indication will disappear.
1. Why am I getting these indexer readings?
2. How can I fix them?
3. Why only enumerations, not # define-s?