Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer not propagating makefile symbols to included headers
Indexer not propagating makefile symbols to included headers [message #1858879] Thu, 27 April 2023 18:27
Eclipse UserFriend
I am working with a makefile based SDK. Macros defined in the project makefile determine which SDK modules are included in the build. These are then passed to the compiler using "-DBUILD_[module]" parameters in calls to arm-none-eabi-gcc. [module] is used here as an example, actual code contains a valid switch.

The main.c file #includes a header provided by the SDK named "test_dev.h". This header then conditionally includes module headers based on the BUILD_[module] macros, as follows:

main.c
#include <test_dev.h>


test_dev.h
#define SOMETHING

// Conditional include
#if defined (BUILD_[module])
#include <[module].h>
#endif


[module].h
#define SOMETHING_ELSE


As is, the indexer resolves SOMETHING, but not SOMETHING_ELSE. If I move the conditional include block from test_dev.h to main.c, both SOMETHING and SOMETHING_ELSE get resolved.

I've done the following so far:

1. Enabled VERBOSE builds to include the compiler calls in the Console
2. Enabled the CDT GCC Build Output Parser with the pattern: (arm-none-eabi-gcc)
3. Rebuilt the project from scratch
4. Rebuilt the index
5. Created a Parser Log File for main.c
6. Verified that BUILD_[module] symbol IS listed in the log

Not sure where to go from here.
Previous Topic:Docker Tooling Perspective isn't be shown
Next Topic:Error when running program
Goto Forum:
  


Current Time: Sun Aug 31 07:07:18 EDT 2025

Powered by FUDForum. Page generated in 0.03688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top