This repository has been archived by the owner on Aug 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 232
Preprocessing: include after prototype #35
Comments
I've got the idea. Thanks for the bug hunting. It will be addressed. |
I've edit the presentation, it's more readable |
Any update on this? Almost every project I've tried to build with ino instead of the IDE fails because of this. There's a lot of (frankly unnecessary) macros used in function definitions, and they wind up causing syntax errors because they haven't been included yet. |
This will be fixed in next release. Unfortunattely there is too few spare time. Will try to find on next week. Thanks for the interest. |
I took a different path against this issue, since @damienstuart 's didn't fix my problem. |
Done in 0.3.6 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi !
I've found a bug in the last version of git. When you want include some libraries in an ino file with the official IDE, it will deplace all the includes in the source file at the top, before all function's prototype.
Take this simple source code for example :
The preprocessing of this file will build this file with the official IDE :
But with ino, the result will be a little different :
So there is no error with the arduino's IDE, but with ino, the compiler say that FatReader is not defined.
Here is a quick patch to get all #include in the file and put it on top of the file. Note that my regex is certainly too simple but the principle is here.
The text was updated successfully, but these errors were encountered: