How to include path ?!

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.

1 Like