PlatformIO Community

Handling dependencies that use the same header file names

Is there an option to require a package/dependency name in #include statements?

Say my dependency has a following structure:

+ Color.h

Where Color.h has a very simple class that is fully declared in a .h file alone.

Now in my project that uses this dependency I normally should include it with:

#include <Color.h>

But I get errors because project has also a dependency on FastLED which also has a Color.h file.

It would be much better if PlatformIO required me / gave the option to use more explicit references, like:

#include <Color/Color.h>// My custom lib
#include <FastLED/FastLED.h>// My custom lib

I went though the PIO docs but no information on how to achieve this. This is even bigger problem when some of my libs have class Base.h.

Similar thing used to happen with the Time library because someone unfortunately called it… well… time.h … not the smartest of moves, calling it the same same name as a standard library… :open_mouth:

What about using "" instead of <>

Although PlatformIO does pre-processing itself for the Library Dependency Finder, it should still be following these rules?