Well thatβs the wrong approach!
I know, however, that such a sharing of libraries is againts Platformio startegyβ¦
For a good reason - as you have found out
But you can use symlink instead to have some similiar but working behavior.
lib_deps =
symlink://path-to-Utils.h
symlink://path-to-Blink.h
Take a look at this post:
If you have a folder strukture like this:
.
βββ libraries
β βββ LibA
β βββ LibB
β βββ LibC
βββ projects
βββ ProjectA
βββ ProjectB
βββ ProjectC
Then you can use relative symlinks.
Example:
Project-B depends on LibA and LibC
platformio.ini of ProjectB:
lib_deps =
symlink://../../libraries/LibA
symlink://../../libraries/LibB
This ensures that only LibA and LibB are used to build ProjectB but not every library in the libraries folder.