Closed
Description
Example code ...
Sketch:
#include "test.h"
void setup () { }
void loop () { }
File "test.h":
byte x;
Error:
In file included from sketch_jul24c.ino:1:
test.h:1: error: 'byte' does not name a type
Generated code from pre-processor:
#line 1 "sketch_jul24c.ino"
#include "test.h"
#include "Arduino.h"
void setup ();
void loop ();
#line 3
void setup () { }
void loop () { }
If the include for "Arduino.h" had been done first (before the rest of the sketch was copied in) then the declarations in test.h would work. As it is, you now have to add an include into the front of all the .h files which defeats the usefulness of having the automatic inclusion in the main sketch.
IDE 1.0.5.
These look related: