Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Juno's "Preprocessor Include Paths, Macros etc." symbol scanner for CDT

So there has been an overhaul of the scanner discovery as worked on here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290631
http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg24345.html

However, I can't find any information on how to use it. I upgraded from Helios to Juno recently and now I have 8000 "Semantic Errors" and a ton of unresolved includes. However, I can't figure out how to use this new feature. I don't think there's any documentation yet, either.

I think the intent is it will scan your project and automatically discover macros and include directories in order to aid in symbol resolution and project navigation.

I'll keep working on it and update this question if I ever figure it out.

like image 449
Jeff Lamb Avatar asked Jun 20 '12 18:06

Jeff Lamb


1 Answers

Figured it out.

Used this as a guide: https://developer.mozilla.org/en/Eclipse_CDT

In the project properties, "C/C++ Build", I replaced the default build command with my build command. I had to remove a -s switch (silent switch) so the output parser could grab all the paths and macros from the compiler commands. Pointed the "build directory" to the directory with my makefile.

Under "C/C++ General" > "Preprocessor Include Paths, Macros etc." > "Providers" I selected CDT User Setting Entries and CDT GCC Build Output Parser. I then had to change the compiler command pattern to match my gcc cross compiler. To do that, I just changed "gcc" to "arm-elf-gcc".

After a full build (do not use multi-core builds for the first indexing), right click your project, click 'index' and 'rebuild'. After this, the output parser populated the indexes correctly and they showed up under "C/C++ General" > "Preprocessor Include Paths, Macros etc." > "Entries"

like image 122
Jeff Lamb Avatar answered Sep 28 '22 01:09

Jeff Lamb