Ok so this might be something really stupid, but after searching and searching for ages I still have no idea why this doesn't work for me, while it seems to work fine for others.
All i'm trying to do is a simple preprocessor block but it just spits out the same error.
#define DEBUG 1
#ifdef DEBUG
Serial.print("Some debug stuff follows");
#endif
void setup() {
}
void loop() {
}
Surely this should print that string if DEBUG is defined, however all i get is:
"PreProcessing:5:1: error: 'Serial' does not name a type
Serial.print("Debug mode");
^
exit status 1
'Serial' does not name a type"
Please help me, i'm literally going insane.