PlatformIO Community

PIO library doesn't see header files in project's include folder


#1

It happened to me now several times, that a library needs a configuration file in order to work. This file has to be created by user and it’s not included in the library itself.

The problem is, that PlatformIO doesn’t see header files that are referenced by the library, but are present in the projects include folder. This has happened to me at least with uGFX library , STEmWin and now with FatFS library.

I tried adding the path to my project’s ‘include’ folder via build_flags. It then moved forward, but stuck again when a library was referencing files, which were either:

  • added into the project with lib_extra_dirs
  • part of the framework

The only thing that worked for me, was adding paths to each individual folder with build_flags = -I/path_to_folder/. But that is not a long-term solution and impossible to do with larger/complex libs.

So always when library wants to reference anything outside it, build process crashes. Can someone confirm that it’s the PlatformIO problem?