I attempted to use the library at PlatformIO Registry to play with printf() in an Arduino sketch, but it seems that there’s a directory missing. The directory is named “extras” and the LibPrintf.h file attempts to #include ../extras/printf/printf.h and fails straight away.
The library that’s installable on the Arduino IDE does have this directory, and can be happily used. But, I’m using PlatformIO. I’ve got around the problem by copying the “extras” directory from the Arduino library, and pasting it into .pio/libdeps/uno/LibPrintf after which, compiling a project works fine.
Obviously, this is needed for any project using this library.
The problem appears to be that when uploading to the registry, PlatformIO doesn’t pick up the extras directory. The workaround given is to use the library directly from github: