'error: unknown type name 'class'' after christmas break.

Hi all,

I'm currently using Arduino as the platform to control my quadcopter (final year university project). The code ran without problems before christmas, however upon my return, I'm receiving the following error when attempting to verify the project. My initial move was to re-download the IDE (1.6) as I thought it could be java related but this seemed to make no difference. I have no idea where to go now because I don't actually know what the error is telling me.

Any help would be much appreciated.

In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Print.h:27:0,
                 from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Stream.h:26,
                 from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/Wire.h:26,
                 from Gaui_FlightControlSystem.c:1:
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Printable.h:25:1: error: unknown type name 'class'
 class Print;
 ^
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Printable.h:33:1: error: unknown type name 'class'
 class Printable
 ^
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Printable.h:34:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^

Check you have the correct board selected.

Sorry! I wasn't too sure where to post this, but evidently its in the wrong place. Can I move it or will a mod need to do it?

AlexGodbehere:
Sorry! I wasn't too sure where to post this, but evidently its in the wrong place. Can I move it or will a mod need to do it?

Sorry, perhaps I wasn't too clear. :slight_smile:

In the IDE goto Tools.. Boards... and check that the board selected matches the one you are using.

My bad, reading it back that made perfect sense. The correct board is selected, yes (Mega 2560).

Is it exactly the same code that compiled before? It often turns out in similar cases that it's "exactly the same apart from some minor tweaks I made that should make no difference".

In either scenario, to make progress now, I suggest you post your code - if it's too large, attach it.

I thought it was, but after reverting to a backup I made on the last day of the semester it seems to compile fine. Sorry for wasting your time guys. Thanks!