Linker Errors after upgrading from PIO2 to PIO3

Hello, was there any change that would affect -I$PROJECTSRC_DIR? I added this build flag because my library depends on a few variables being defined from the main project folder. It was working fine in PIO2 but now the linker fails with many undefined references after upgrading to PIO3. I read the section on the library dependency finder and tried to help by adding lib_ldf_mode = 2 but that did not affect the error. Can you help me discover what has changed between PIO2 and PIO3 that would cause this to fail?

This is the platformio.ini file I’m using:

env_default = pro16MHzatmega328
lib_ldf_mode = 2

platform = atmelavr
framework = arduino
board = pro16MHzatmega328
build_flags = -I$PROJECTSRC_DIR
src_filter = "+<*> -<.git/> -<svn/> -<example/> -<examples/> -<test/> -<tests/> -<archive/>"

Here is a link to the project archive:

Thanks very much.

See answer for the same issue