Eclipse - Problem with wrong error highlighting

Hi,

i am new to Arduino. Maybe this question was answered elsewhere but i was searching this forum and I couldn’t find anything about this problem.

I am trying to user Eclipse for sketch-Development rather than Arduino-IDE because of the nice code-completion feature.
I followed the checklist in the Arduino-Playground Eclipse Howto (http://www.arduino.cc/playground/Code/Eclipse) and was finally able to write some small sketches and upload it to my arduino UNO-board. So, every thing is fine - almost.

While the compiler/linker/avrdude is compiling/linking/uploading the code without errors, when i am working in a C+±File, the Eclipse IDE doesn’t seem to recognize the variable typedefs (uint8, uint16 etc.) and therefore is highlighting every command in my code with parameters of such types: e.g. “pinMode(?,?) Unrecognized Parameters”. However, this problem does not occure when working with C-Files.

Although this is not a showstopper, it is a little bit annoying an makes the on-the-fly error-highlighting useless because it highlights many lines of code that actually doesn’t contain errors making the real errors harder to spot, so i really want to solve this problem.

I’m using “eclipse indigo cdt with linux tools” on xubuntu 11.04 64bit and installed the arduino-plugin using the update site (AVR Eclipse Update Site)

I am thankful for any help.

Regards
Christian

You probably are missing an include path in the C++ setup.

if that was the case, the code would not compile and it would not work on the device, but it does, it compiles without any warning. only the eclipse-editor doesn't know. - even so, i double checked again every setting that is mentioned in the howto, all paths are set.

are there any settings specific to the code-completion/error-highlighting functionality of the editor?

Download this template project that I created. All the settings are in there and should help you to get the bug.

Thanks for the help Marius, but i had the same problem with your template project.

but i finally found a solution (at least workaround) for my problem:
I had to add the path ‘/usr/lib/avr/include’ which contains stdint.h (uint8, uint16 etc.) to the list of paths in the ‘GNU C++’ Section under Properties → C/C+±General → Paths and Symbols.

I am happy that you got it working.