I tried every imaginable combination of build_src_filter folder paths to exclude
lib/EthernetTeensy/src as suggested by documenation and ChatGPT.
Every single time the Library Dependency Finder was seeing my main.cpp file
inclusion of EthernetTeensy.h even though it was bracketed by the macro flag
declared in only one of the environments.
I checked that the flag was working by putting ‘#error This is active!’ in the defined
section.
The only solution was: lib_ignore = EthernetTeensy
The documentation states that the LBF is supposed to account for define macro
flags. Why isn’t it working for me?
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
build_flags = -Wall -Wextra -D COMPILE_FOR_DEVICE
[env:laptop]
platform = native
build_flags = -Wall -Wextra
lib_ignore = EthernetTeensy
; the following did NOT work
build_src_filter = +<*> -<lib\EthernetTeensy\src>