I am trying to make some sort of circular stack that should let me add an element at the top, read elements from top to bottom, and eliminate (only when the stack is full) the element at the bottom.
In this regard I thought of adding the C++ Standard Template Library to my code so that I can use a Deque or a Stack.
The only template library I found was Embedded Template Library by John Wellbelove and I’m using it with lib_deps = https://github.com/ETLCPP/etl.git
But I don’t know how to include what I need in order for it to work.
This is what the creator of the library said:
You need to set the path to the ETL’s “include” directory as one of the projects addition include paths so that you can say #include “etl/deque.h”
If you refer to the same question asked in your other topic:
You could follow the @pfeerick suggestion of using build_flags=-Idir in your platformio.ini file, you could add build_flags=-I/home/the_path_to_your_headers (I just tested this on linux, but in windows it should be the same, as the docs say the “build_flags” is a string, you just need to type the ‘-I’ and the string absolute path):
I have not included built libraries yet, or done arduino projects using platformio, so not sure how to do that kind of includes, but, as the IDE suggests I’m reading the documentation about the VSCode package manager (as @pfeerick mentioned in other post, this is handled by VSCode not PIO) https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2019
But in any case, you could include one of this using the “build_flags” options ‘-I’ (capital i) and ‘-l’ (lowercase L) as you would in a manual compilation (or makefile configuration), tho it might be harder to maintain and port to other projects than using the tools that the environment is offering.