just wanted to update on this issue. I’ve found another way …
By setting the src_dir value in the [platformio] section in the platform.ini file to the folder where the example is located you can compile and run the example without changing your main.cpp …