PlatformIO "undefined reference to"

HI,
I am quite new to PlatformIO.
I start with Waveshare ESp32-S3-touch-LCD-7 monitor, for this project I use the following libraries:

https://github.com/esp-arduino-libs/ESP32_Display_Panel.git#v0.1.6
https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v0.0.3
lvgl/lvgl@8.3.11
iamfaraz/Waveshare_ST7262_LVGL @ ^0.1

I receive this linker errors:

C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/lib/esp32s3/no-rtti\libc.a(libc_a-getentropyr.o):(.literal+0x4): warning: _getentropy is not implemented and will always fail
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/Users/s.dolciotti/.platformio/packages/framework-arduinoespressif32-libs/esp32s3/qio_opi\libesp_system.a(startup.c.obj):(.literal.__esp_system_init_fn_init_components0+0x8): undefined reference to `_Unwind_SetEnableExceptionFdeSorting'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/Users/s.dolciotti/.platformio/packages/framework-arduinoespressif32-libs/esp32s3/qio_opi\libesp_system.a(startup.c.obj): in function `__esp_system_init_fn_init_components0':
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/startup.c:497:(.text.__esp_system_init_fn_init_components0+0x1e): undefined reference to `_Unwind_SetEnableExceptionFdeSorting'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/Users/s.dolciotti/.platformio/packages/framework-arduinoespressif32-libs/esp32s3/lib\libnewlib.a(reent_init.c.obj):(.iram1.0.literal+0x4): undefined reference to `_cleanup_r'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/Users/s.dolciotti/.platformio/packages/framework-arduinoespressif32-libs/esp32s3/lib\libnewlib.a(newlib_init.c.obj):(.data.s_stub_table+0x98): undefined reference to `_cleanup_r'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/ESP-LCD/src/main.cpp.o:(.literal._Z5setupv+0xc): undefined reference to `ESP_Panel::ESP_Panel()'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/ESP-LCD/src/main.cpp.o:(.literal._Z5setupv+0x10): undefined reference to `ESP_Panel::init()'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/ESP-LCD/src/main.cpp.o: in function `setup()':
C:\Progetti\ESP32\IOTHome/src/main.cpp:17:(.text._Z5setupv+0x40): undefined reference to `ESP_Panel::ESP_Panel()'
C:/Users/s.dolciotti/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Progetti\ESP32\IOTHome/src/main.cpp:18:(.text._Z5setupv+0x48): 
undefined reference to `ESP_Panel::init()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\ESP-LCD\firmware.elf] Error 1

this is my platformIO.ini

[env:ESP-LCD]
platform = espressif32
board = ESP-LCD
platform_packages =							
        platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#3.0.3
        platformio/framework-arduinoespressif32-libs@https://github.com/esp-arduino-libs/arduino-esp32-sdk.git#high_perf/v3.0.3
framework = arduino
upload_speed = 921600
monitor_speed = 115200
board_upload.flash_size = 8MB
board_build.f_flash = 80000000L
board_upload.maximum_size=8388608
build_flags = 
	-D BOARD_HAS_PSRAM
	; -DARDUINO_USB_CDC_ON_BOOT=0     ; If using UART port
	-DARDUINO_USB_CDC_ON_BOOT=1     ; If using USB port
	-DCORE_DEBUG_LEVEL=1            ; Set to `5` for full debug output, `0` for none
	-DLV_CONF_INCLUDE_SIMPLE
	-DLV_LVGL_H_INCLUDE_SIMPLE
	-I src
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
lib_deps = 
	https://github.com/esp-arduino-libs/ESP32_Display_Panel.git#v0.1.6
	https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v0.0.3
	lvgl/lvgl@8.3.11
	iamfaraz/Waveshare_ST7262_LVGL @ ^0.1
	bblanchon/ArduinoJson @ ^7.3.0
	adafruit/Adafruit_VL53L0X @ ^1.2.4

and this is my test main:

#include <Arduino.h>
#include <ESP_Panel_Library.h>
//#include <Waveshare_ST7262_LVGL.h>
#include <lvgl.h>

#include "../include/Debug.hpp"

void setup() {
    initDebug();
    printDebug("Initialize display and touchscreen", true);
    //lcd_init();
    ESP_Panel *panel = new ESP_Panel();
    panel->init();
    printDebug("Create UI", true);
    //Lock the mutex due to the LVGL APIs are not thread-safe
    //lvgl_port_lock(-1);
    /**
     * Or try out a demo.
     * Don't forget to uncomment header and enable the demos in `lv_conf.h`. E.g. `LV_USE_DEMOS_WIDGETS`
     */
    //lv_demo_widgets();
    // lv_demo_benchmark();
    // lv_demo_music();
    // lv_demo_stress();
    //Release the mutex
    //lvgl_port_unlock();
}

void loop() {
    delay(500);
}

Thanks for the help in advance.

This is not good because it doesn’t change the used compiler, which might result in the errors you’re seeing. It’s better to use https://github.com/pioarduino/platform-espressif32 as the platform and don’t use any platform_packages modification, to get a clean Arduino-ESP32 3.x version. Look at the release pages to find the right platform value depending on the Arduino-ESP32 core version you need. For 3.0.3:

platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.03/platform-espressif32.zip

Or just always the latest stable version (currently 3.0.11)

platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip

thank you very much,
with this solution I build correctly my project.
I also deleted the folders under .platformio:
packeges
platforms
.cache

but if i add the library “GitHub - iamfaraz/Waveshare_ST7262_LVGL: Waveshare_ST7262_LVGL is an Arduino library designed for Waveshare ESP32-S3 SOC with 7 inch ST7262 LCD and GT911 touchscreen to facilitate rapid GUI development using LVGL.
the problem come back. this is not a problem, i’ll create own library.