Closed allyourcode closed 1 year ago
I'm assuming that the #include needs to be in every file that has STL #incldues...
Nope, it just needs to be in a single .ino file (or .c/.cpp file in a library that uses it). Doing so causes it to be put in the include path for all compilation runs.
I've added elaboration to my change.
I've done a bunch of experiments, and as best as I can tell, the rule is "you need (at least) one #include
Ideally, you wouldn't need to #include
Ideally, you wouldn't need to #include
at all, but I assume there is some technical limitation which prevents getting rid of this requirement?
To decide what libraries a sketch needs, it builds a list of .h files that each library has. Then it runs the preprocessor on the sketch, to find out what files it tries to include but are not available. Every missing include is then matched against that list, to select a library for each one.
The problem here is that this library uses include files without the .h extension, which will not show up in the list and thus not allow the Arduino IDE to mark this library as required.
Does that clarify things? :-)
Namely, that you need to #include . For searchability, I mention the error message that will appear if you fail to do this.
New instruction(s) are in a new section named "How do I use it?"