I’ve tried it before but maybe I described my issue too complicated. So I give it one more try in a stripped down explanation.
I have in my platformio project *.cpp in /src and *.h in /incl.
I have all my libraries in a path outside of the project(s).
I include this library tree with
lib_dir = c:\Projekte\PIO\Libraries\Common
The Testprogram in the pio-project’s /src consists of only
and more or less empty setup() and loop()
The TestIncl has in it:
#pragma message “Hello, I am the TestIncl.h”
L06_TimerV2.h is the Header-File of one of my libraries
in the lib_dir path.
Compiling & Building works as expected.
Now I want to inlcude another directory with include files.
(Why? See here for the more complicated explanation:
I added an additional include path with
And then, just for the purpose of this test, I MOVED the TestIncl.h
file from my local (project) /include to the “Outside” additional path.
Building the project then finds TestIncl.h at the Outside location as expected. But out
of TestIncl.h the
cannot be resolved.
G:/Projekte/PIO/ExtraIncludes/TestIncl.h:2:17: fatal error: L06_TimerV2.h: No such file or directory
So the question is, why the nested #include in the Header-File can be resolved
when in the project /incl folder and not, when in the “Outside” folder?