I have been building a private library for my Arduino projects.
It is a project in its own right with each of the main components in a sub-directory under the project’s main directory.
DplhArduinoLibrary/
lib/
Components/
src/
Gme12864Xx_Oled.h
Hc595ShiftRegister.h
Oleds.h <-- The file that can not be found.
Network/
Syslog/
Utilities/
src/
I2CMux.h
Logger.h
platformio.ini
...
My platformio.ini file defines a number of build environments. The one I am working with at the moment is “env:oleds_test” which extends from others. It looks like this:
[env:feather_m0]
platform = atmelsam
board = adafruit_feather_m0
framework = arduino
env:test_base]
extends = env:feather_m0
build_flags =
${env:feather_m0.build_flags}
-D ERROR_PRINTABLE
[env:oleds_test]
extends = env:test_base
build_flags =
${env:test_base.build_flags}
-D TEST_MAIN_CPP="\"../unitTests/OledsTest.cpp\""
lib_deps =
adafruit/Adafruit GFX Library@^1.12.5
adafruit/Adafruit SSD1306@^2.5.16
Building the project results in a “src/../unitTests/OledsTest.cpp:29:10: fatal error: Oleds.h: No such file or directory” error.
Turns out that the compiler can’t find any of the files in lib/Components/src. The application also includes files from lib/Utilities/src and it finds those just fine.
The full path to lib/component/src is included in the .pio/build/oleds_test/idedata.json file.
I have done a clean.
I have removed the .pio directory.
So, what am I missing?
TIA