I found couple of libs for mbed framework that have some code placed in subdirectories yet they are referenced as if they would be placed in root. I guess online compiler for mbed takes care of adding appropriate directory include directive (in fact you can see this if you export the library on mbed site to “desktop” and specify GCC_ARM platform) but PIO does not specify this directive and compilation fails. Simplest case to reproduce would be to install MODSERIAL (id:218) and try to compile following code:
Moreover, when using PIO IDE these header files are missing in project libraries mirror and compilation fails with .pioenvs/disco_f051r8/MODSERIAL_ID218/MACROS.h:26:31: fatal error: MODSERIAL_LPC1768.h: No such file or directory.
Unfortunately there is nothing that could help library builder in such situations. The only place where expected -I and -L directives can be found is export archive from mbed site - it contains ready Makefile to compile the library. So I guess for now we are limited to this workaround, unless library builder will be able to use these Makefiles as reference (which seems unlikely, or is it?).