Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] The Indexer only wants to use the default system headers

Dear all,

Within Eclipse I encountered the problem that "Open Declaration" (F3) may take you to the wrong file. In my case I followed "malloc.h" and saw that there were __malloc_hook definitions. So, I added code that rerouted all my calls to malloc to an allocation function for FreeRTOS (an OS for microcontrollers). However, it turned out that I had been looking at the wrong "malloc.h" file! Apparently the Indexer in Eclipse returns the /usr/include/malloc.h file while it should have returned the /opt/arm-2008q1/arm-none-eabi/include/malloc.h file (of my arm-none-eabi cross-compiler).

To make myself very clear: Compiling everything works okay! However, the indexer doesn't work.

Changing the "Compiler Invocation Command" at Project Properties to /opt/arm-2008q1/bin/arm-none-eabi-gcc or by running it from the console by: arm-none-eabi-gcc -E -P -v -dD $MYPROJECT/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c doesn't work at all. By the way, the $PATH is neither recognized w.r.t. the Indexer. Just writing arm-none-eabi-gcc leads to the following error:

Error launching external scanner info generator (arm-none-eabi-gcc -E -P -v -dD $MYPROJECT/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)
Error launching external scanner info generator (arm-none-eabi-g++ -E -P -v -dD $MYPROJECT/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)

Each time I rebuild all files and I refresh all files in the "right mouse click popupmenu" - indexer. But each time F3 (Open Declaration) takes me to the wrong file... :-(

And... it doesn't help if I set nostdinc or nostdinc++ on the Compiler Invocation Command. In contrary, now, the same error as above is generated. Can anybody help me out? Did anybody made CDT/Eclipse work properly in directing to the right index files on F3?

I used the Fast C/C++ Indexer and I enabled the setting "Index all files (files neither built nor included, also).

Kind regards,

Anne

Back to the top