Hi.
I’m switching from TFT_eSPI to LovyanGFX library and when building, I get multiple errors "error unknown type name ‘namespace’ " on such line in .hpp header files :
namespace lgfx
{
...
It leads me to think that it is not compiling in C++, but rather in C as it doesn’t seem to recognize the “namespace” keyword.
I added the LGFX library with this platformio.ini line :
lib_deps = lovyan03/LovyanGFX@^1.1.12
Here is the build command line for this library :
Using tempfile C:\Programming\PlatformIO\Projects\module-central\.pio\build\lilygo-t-display-s3\tmpl275kl6a.tmp for command line:
xtensa-esp32s3-elf-gcc -o .pio/build/lilygo-t-display-s3/libf34/LovyanGFX/lgfx/Fonts/IPA/lgfx_font_japan.c.o -c -Og -Wall -Werror=all -Wextra -Wno-er
ror=deprecated-declarations -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-variable -Wno-old-style-declaration -Wno-
sign-compare -Wno-unused-parameter -fdata-sections -ffunction-sections -fmacro-prefix-map=C:/Programming/PlatformIO/Projects/module-central=. -fmacro
-prefix-map=C:/Users/xxxxx/.platformio/packages/framework-espidf=IDF -fno-jump-tables -fno-tree-switch-conversion -fstrict-volatile-bitfields -ggdb
-mlongcalls -include src/Boards/Lilygo-T-Display-S3.hpp -fexceptions -D_POSIX_READER_WRITER_LOCKS -DESP_PLATFORM -DIDF_VER=\"4.4.4\" -D_GNU_SOURCE -D
PLATFORMIO=60107 -DARDUINO_LILYGO_T_DISPLAY_S3 -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE
=1 -DLV_CONF_PATH=C:/Programming/PlatformIO/Projects/module-central/src/lv_conf.h -DLV_CONF_INCLUDE_SIMPLE=C:/Programming/PlatformIO/Projects/module-
central/src/lv_conf.h -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DCONFIG_BARCODE_SCANNER_MAX_SCANTIME_SEC=2.8f -DBARCODE_SCANNER_BUFFER_SIZE=5
00 -DCORE_DEBUG_LEVEL=5 -DLOG_LOCAL_LEVEL=5 "-D CONFIG_ESP_AP_AUTHMODE=WIFI_AUTH_WPA2_PSK" "-D CONFIG_ESP_WIFI_SSID=\"XXXX_XXXX\"" "-D CONFIG_ESP_WIFI_P
ASSWORD=\"XXXXXXXXXXXXX\"" -DCONFIG_ESP_WIFI_MAXIMUM_RETRY=5 -DCONFIG_MQTT_PROTOCOL_5=y "-D CONFIG_BROKER_URL=\"mqtts://url.s2.eu.hivemq.cloud:8883\"" "
-D CONFIG_MQTT_BROKER_USERNAME=\"xxxxxxxxx\"" "-D CONFIG_MQTT_BROKER_PASSWORD=\"XXXXXXXXXXXXX\"" -DCONFIG_MQTT_BUFFER_SIZE=4096 -DCONFIG_EXAMPLE_CONNECT_ETHERNET=y
-DCONFIG_EXAMPLE_CONNECT_WIFI=n -DCONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y -DCONFIG_EXAMPLE_ETH_PHY_IP
101=y -DCONFIG_EXAMPLE_ETH_MDC_GPIO=23 -DCONFIG_EXAMPLE_ETH_MDIO_GPIO=18 -DCONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5 -DCONFIG_EXAMPLE_ETH_PHY_ADDR=1 -DI2C_MA
STER_SDA_GPIO_PIN=43 -DI2C_MASTER_SCL_GPIO_PIN=44 -DI2C_MASTER_PWR_GPIO_PIN=-1 -DI2C_MASTER_FREQ_HZ=100000 -DSERIAL_RX_GPIO_PIN=1 -DSERIAL_TX_GPIO_PI
N=2 -DLCD_PWR_GPIO_PIN=15 -DLCD_SCREEN_WIDTH=170 -DLCD_SCREEN_HEIGHT=320 -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DARDUINO=108
12 -DARDUINO_ESP32S3_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD=\"ESP32S3_DEV\" -DARDUINO_VARIANT=\"esp32s3\" -DESP32 -I.pio/libdeps/lilygo-t-display-s
3/LovyanGFX/src -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_ringbuf/include -I.pio/build/lilygo-t-display-s3/config -IC:/U
sers/iotdev/.platformio/packages/framework-espidf/components/newlib/platform_include -IC:/Users/iotdev/.platformio/packages/framework-espidf/componen
ts/freertos/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/freertos/include/esp_additions/freertos -IC:/Users/iotdev/.pla
tformio/packages/framework-espidf/components/freertos/port/xtensa/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/freertos
/include/esp_additions -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_hw_support/include -IC:/Users/iotdev/.platformio/packag
es/framework-espidf/components/esp_hw_support/include/soc -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_hw_support/include/s
oc/esp32s3 -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_hw_support/port/esp32s3 -IC:/Users/iotdev/.platformio/packages/fram
ework-espidf/components/esp_hw_support/port/esp32s3/private_include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/heap/include -
IC:/Users/iotdev/.platformio/packages/framework-espidf/components/log/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/lwip
/include/apps -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/lwip/include/apps/sntp -IC:/Users/iotdev/.platformio/packages/framew
ork-espidf/components/lwip/lwip/src/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/lwip/port/esp32/include -IC:/Users/iot
dev/.platformio/packages/framework-espidf/components/lwip/port/esp32/include/arch -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/
soc/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/soc/esp32s3 -IC:/Users/iotdev/.platformio/packages/framework-espidf/co
mponents/soc/esp32s3/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/hal/esp32s3/include -IC:/Users/iotdev/.platformio/pac
kages/framework-espidf/components/hal/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/hal/platform_port/include -IC:/Users
/iotdev/.platformio/packages/framework-espidf/components/esp_rom/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_rom/i
nclude/esp32s3 -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_rom/esp32s3 -IC:/Users/iotdev/.platformio/packages/framework-es
pidf/components/esp_common/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_system/include -IC:/Users/iotdev/.platformi
o/packages/framework-espidf/components/esp_system/port/soc -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_system/port/public_
compat -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/xtensa/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/comp
onents/xtensa/esp32s3/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/driver/include -IC:/Users/iotdev/.platformio/package
s/framework-espidf/components/driver/esp32s3/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_pm/include -IC:/Users/iot
dev/.platformio/packages/framework-espidf/components/efuse/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/efuse/esp32s3/i
nclude -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/vfs/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/compone
nts/esp_wifi/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_event/include -IC:/Users/iotdev/.platformio/packages/fram
ework-espidf/components/esp_netif/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_eth/include -IC:/Users/iotdev/.platf
ormio/packages/framework-espidf/components/tcpip_adapter/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_phy/include -
IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_phy/esp32s3/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/com
ponents/esp_ipc/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/app_trace/include -IC:/Users/iotdev/.platformio/packages/f
ramework-espidf/components/esp_timer/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/mbedtls/port/include -IC:/Users/iotde
v/.platformio/packages/framework-espidf/components/mbedtls/mbedtls/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/mbedtls
/esp_crt_bundle/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/app_update/include -IC:/Users/iotdev/.platformio/packages/
framework-espidf/components/spi_flash/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/bootloader_support/include -IC:/User
s/iotdev/.platformio/packages/framework-espidf/components/nvs_flash/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/pthrea
d/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_gdbstub/include -IC:/Users/iotdev/.platformio/packages/framework-esp
idf/components/esp_gdbstub/xtensa -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_gdbstub/esp32s3 -IC:/Users/iotdev/.platformi
o/packages/framework-espidf/components/espcoredump/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/espcoredump/include/por
t/xtensa -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/wpa_supplicant/include -IC:/Users/iotdev/.platformio/packages/framework-e
spidf/components/wpa_supplicant/port/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/wpa_supplicant/esp_supplicant/include
-IC:/Users/iotdev/.platformio/packages/framework-espidf/components/ieee802154/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/compon
ents/console -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/asio/asio/asio/include -IC:/Users/iotdev/.platformio/packages/framewo
rk-espidf/components/asio/port/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/cbor/port/include -IC:/Users/iotdev/.platfo
rmio/packages/framework-espidf/components/unity/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/unity/unity/src -IC:/Users
/iotdev/.platformio/packages/framework-espidf/components/cmock/CMock/src -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/coap/port
/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/coap/libcoap/include -IC:/Users/iotdev/.platformio/packages/framework-esp
idf/components/nghttp/port/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/nghttp/nghttp2/lib/includes -IC:/Users/iotdev/.
platformio/packages/framework-espidf/components/esp-tls -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp-tls/esp-tls-crypto -IC
:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_adc_cal/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/component
s/esp_hid/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/tcp_transport/include -IC:/Users/iotdev/.platformio/packages/fra
mework-espidf/components/esp_http_client/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_http_server/include -IC:/User
s/iotdev/.platformio/packages/framework-espidf/components/esp_https_ota/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/es
p_lcd/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_lcd/interface -IC:/Users/iotdev/.platformio/packages/framework-e
spidf/components/protobuf-c/protobuf-c -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/protocomm/include/common -IC:/Users/iotdev/
.platformio/packages/framework-espidf/components/protocomm/include/security -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/protoc
omm/include/transports -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/mdns/include -IC:/Users/iotdev/.platformio/packages/framewo
rk-espidf/components/esp_local_ctrl/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/sdmmc/include -IC:/Users/iotdev/.platf
ormio/packages/framework-espidf/components/esp_serial_slave_link/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_webso
cket_client/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/expat/expat/expat/lib -IC:/Users/iotdev/.platformio/packages/f
ramework-espidf/components/expat/port/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/wear_levelling/include -IC:/Users/io
tdev/.platformio/packages/framework-espidf/components/fatfs/diskio -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/fatfs/vfs -IC:/
Users/iotdev/.platformio/packages/framework-espidf/components/fatfs/src -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/freemodbus
/freemodbus/common/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/idf_test/include -IC:/Users/iotdev/.platformio/packages
/framework-espidf/components/idf_test/include/esp32s3 -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/jsmn/include -IC:/Users/iotd
ev/.platformio/packages/framework-espidf/components/json/cJSON -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/libsodium/libsodium
/src/libsodium/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/libsodium/port_include -IC:/Users/iotdev/.platformio/packag
es/framework-espidf/components/mqtt/esp-mqtt/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/openssl/include -IC:/Users/io
tdev/.platformio/packages/framework-espidf/components/perfmon/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/spiffs/inclu
de -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/usb/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/
ulp/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/wifi_provisioning/include -IC:/Users/iotdev/.platformio/packages/frame
work-arduinoespressif32/variants/esp32s3 -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/cores/esp32 -IC:/Users/iotdev/.platformi
o/packages/framework-arduinoespressif32/libraries/ArduinoOTA/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/AsyncU
DP/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src -IC:/Users/iotdev/.platformio/packages/framework-arduino
espressif32/libraries/BluetoothSerial/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/DNSServer/src -IC:/Users/iotd
ev/.platformio/packages/framework-arduinoespressif32/libraries/EEPROM/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/librari
es/ESP32/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/ESPmDNS/src -IC:/Users/iotdev/.platformio/packages/framewo
rk-arduinoespressif32/libraries/Ethernet/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/FFat/src -IC:/Users/iotdev
/.platformio/packages/framework-arduinoespressif32/libraries/FS/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/HTT
PClient/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/HTTPUpdate/src -IC:/Users/iotdev/.platformio/packages/frame
work-arduinoespressif32/libraries/LittleFS/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/Insights/src -IC:/Users/
iotdev/.platformio/packages/framework-arduinoespressif32/libraries/I2S/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/librar
ies/NetBIOS/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/Preferences/src -IC:/Users/iotdev/.platformio/packages/
framework-arduinoespressif32/libraries/RainMaker/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src -IC:/Us
ers/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/SD/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/lib
raries/SimpleBLE/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/SPIFFS/src -IC:/Users/iotdev/.platformio/packages/
framework-arduinoespressif32/libraries/SPI/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/Ticker/src -IC:/Users/io
tdev/.platformio/packages/framework-arduinoespressif32/libraries/Update/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libra
ries/USB/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src -IC:/Users/iotdev/.platformio/packages/frame
work-arduinoespressif32/libraries/WiFiClientSecure/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src -IC:/Us
ers/iotdev/.platformio/packages/framework-arduinoespressif32/libraries/WiFiProv/src -IC:/Users/iotdev/.platformio/packages/framework-arduinoespressif
32/libraries/Wire/src -IC:/Users/iotdev/.platformio/platforms/espressif32/builder/lib/factation_utils/serialization -IC:/Users/iotdev/.platformio/pla
tforms/espressif32/builder/lib/factation_utils/serialization/include -IC:/Users/iotdev/.platformio/platforms/espressif32/builder/lib/factation_utils/
serialization/include/jsoncons -IC:/Users/iotdev/.platformio/platforms/espressif32/builder/lib/factation_utils/serialization/include/jsoncons_ext .pi
o/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/Fonts/IPA/lgfx_font_japan.c
Any idea how I could solve this problem ?