Skip to main content

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

Try to add /opt/arm-2008q1/arm-none-eabi/include to the list of
include directories of your project (Properties->C++ General->Paths
and Symbols) and rebuild the index.
Also, you can try to use Properties->C++ Build->Discovery
Options->Discovery Profile options->Load Build output from file.
Using it, you can use the build log to be parsed and all the include
paths and symbols to be added to the project automatically.

2008/11/26 Anne van Rossum <anne@xxxxxxxxxxx>:
> 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
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top