How do I add third-party(private) libraries downloaded from the Internet?(No such file or directory)

Well a good start would be to put the downloaded library into the lib folder so that you have lib/<your new library>/<source files>.

To control the build options of the library, and which files are build if exclusions are needed, can be done through adding a library.json file:

https://docs.platformio.org/en/latest/manifests/library-json/index.html

More complicated libraries might need custom Python logic to build, (see extra_scripts above), but that really depends on the library. A good library.json should work for most libraries.

1 Like