You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the readme, "includes - (available from IDE 1.6.10) (optional) a comma separated list of files to be added to the sketch as #include <...> lines. This property is used with the "Include library" command in the IDE. If the property is undefined all the headers files (.h) on the root source folder are included."
This doesn't seem to be compatible with the /src folder being used to store the library files, as if the include parameter is left blank, then the include statement in your Sketch has a blank #include <> instead of including all the .h files in the /src folder. It should look in src as well as root, surely?
I believe this to be a bug, or at least something which needs updating.
By "undefined", it means there is no includes field in library.properties, not that there is an includes field but it was left blank. I have changed the specification wording to "missing". I think that makes the meaning more clear.
This doesn't seem to be compatible with the /src folder being used to store the library files, as if the include parameter is left blank, then the include statement in your Sketch has a blank #include <> instead of including all the .h files in the /src folder. It should look in src as well as root, surely?
"root source folder" is intended to mean the root of the folder that contains the source files. That's the src folder if the library is in 1.5 format or the library root folder if it's in 1.0 format. So it applies no matter what format the library is in. I'm not sure how that part of the specification could be better worded. Any suggestions are welcome.
If you have this line in your library.properties file:
includes=
and you do a Sketch > Include Library > {LIBRARYNAME}, The Arduino IDE will insert this line in your sketch:
#include<>
That happens regardless of which format the library is in.
I believe this to be a bug
Although you misunderstood the cause of the issue, I do agree that ideally the IDE code would be smart enough to realize that adding an empty #include directive will never be the correct thing to do and fall back to the behavior of a missing includes field when the includes field is blank.
per1234
changed the title
library.properties file, include parameter and /src folder
IDE inserts an empty #include directive when the library.properties includes field is blank
Aug 2, 2018
As per the readme, "includes - (available from IDE 1.6.10) (optional) a comma separated list of files to be added to the sketch as #include <...> lines. This property is used with the "Include library" command in the IDE. If the property is undefined all the headers files (.h) on the root source folder are included."
This doesn't seem to be compatible with the /src folder being used to store the library files, as if the include parameter is left blank, then the include statement in your Sketch has a blank
#include <>
instead of including all the .h files in the /src folder. It should look in src as well as root, surely?I believe this to be a bug, or at least something which needs updating.
Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format
The text was updated successfully, but these errors were encountered: