amperka / ino

Command line toolkit for working with Arduino hardware
http://inotool.org
MIT License
1.08k stars 233 forks source link

Prototypes at top of file fail when functions use custom types #211

Open chennes opened 9 years ago

chennes commented 9 years ago

ino's preprocessor places function prototypes at the very top of the file, right below the includes. This means that any function that returns a custom type (struct, typedef, etc.) defined lower in the file will fail to compile due to the type being undefined at the prototype declaration. It also pays no attention to whether the prototypes have been manually added, resulting in multiple declarations in cases when they have been.

nophead commented 9 years ago

This is an Arduino IDE feature, see #224 for solution.