.hpp header files seems to compile in C and not C++

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 ?

Do you change an existing project from TFT_eSPI to LovyanGFX?

What happens if you create an empty new project which uses the LovyanGFX?
Does the error then also occur?

An error log could be helpful.

Hi.

The project initially didn’t use any display. I first added a display using TFT_eSPI (working fine), then LovyanGFX (giving me those errors).

As I’m limited in the length, here is the relevant part of the logfile (note that there are other error that I have not addressed yet) :

In file included from .pio/libdeps/lilygo-t-
display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:20,
components/esp-tls/esp-tls-crypto -IC                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
:                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
/                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
Use                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
rs/                 from <command-line>:
iot.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace'
dev namespace lgfx
/. ^~~~p~~~~lat~
formi.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribut
e__' before '{' token
o/packages/framework-espi {
df/components/esp_adc_cal/include  ^
-IC:/UsIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
ers                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
/iotdev/.platformio/packages/framework                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
-e                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
spi                 from <command-line>:
df/components/es.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
p_ namespace lgfx
hi ^~~~d~/~i~n~c~
lu.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '{' token
de  {
-IC ^
:/UIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:20,
sers/iotdev/.p                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
la                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
tfo                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
r                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
mio                 from <command-line>:
/pac.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace'
ka namespace lgfx
ges/fram ^~~~ew~~~~~
.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '{' token
 {
 ^
orIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
k-espidf/components/tcp_transport/include -IC:/Users/iotdev/.platformio                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_i
nit.hpp:22,
/pa                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
cka                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
ges/framework-espidf                 from <command-line>:
/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
com namespace lgfx
po ^~~~n~e~n~t~s~/
esp_ht.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute
__' before '{' token
tp_client/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/components/esp_http_server/include -IC:/Users/iotdev/.platformio/p {
a ^
ckaIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:20,
ges                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
/fr                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
ame                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
wo                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
rk-e                 from <command-line>:
sp.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace'
idf namespace lgfx
/ ^~~~c~o~m~p~o~n
en.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__
' before '{' token
ts {
/esp_h ^
ttIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
ps                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
_ot                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
a/include -IC:/Users/iot                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
de                 from <command-line>:
v/..pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
pla namespace lgfx
tf ^~~~o~r~m~i~o~/
pa.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '{' token
cka {
ges ^
/fIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:20,
r                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
ame                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
wor                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
k-                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
esp                 from <command-line>:
idf/components/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace'
esp_lcd/include -IC:/Users/iotdev/.platformio/packages/framework-esp namespace lgfx
 ^~~~~~~~~
idf/components/esp_lcd/interface -IC:/UseIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:2
0,
rs                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
/iotd                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
e                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
v/.platf                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
ormio                 from <command-line>:
/packages/framework-espidf/components/protobuf-c/protobuf-.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1
: error: unknown type name 'namespace'
c -IC:/Users/iotdev/.platformio/ namespace lgfx
pa ^~~~ckages/framew~~~~~
ork-espidf/components/protocomm/includ.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=
', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '{' token
 {
 ^
In file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
e/                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
common -I                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
C:/Users/iotdev/                 from <command-line>:
.p.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
 namespace lgfx
 ^~~~~~~~~
In file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
latformio/pa                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
ckage                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
s/                 from <command-line>:
.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
 namespace lgfx
 ^~~~~~~~~
.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__' be
fore '{' token
 {
 ^
.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__' be
fore '{' token
 {
 ^
In file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:20,
                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
fra                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
mework-espidf/components/protocomm/include/security -IC:/Users/iotdev/.                 from <command-line>:
platformio/packages/framework-espidf/components/protocomm/include/transports -IC:/Users/iotdev/.p.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/
v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace'
latformio/packages/framework-espidf/components/mdns/include -IC:/Users/iotdev/.platformio/packages/framework-espidf/compon namespace lgfx
ents/esp_local_ctrl/include -IC:/Users/iotdev/.platfo ^~~~~~~~~
.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '{' token
 {
 ^
In file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
r                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
m                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
io/                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
pac                 from <command-line>:
kag.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
es/f namespace lgfx
ra ^~~~m~e~w~o~r~k
-.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__' b
efore '{' token
esp {
idf ^
/coIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:20,
mp                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
on                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
ent                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
s/s                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
dm                 from <command-line>:
mc/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace'
inc namespace lgfx
lu ^~~~d~e~ ~-~I~C
:/Users/iotdev/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:23:1: error: expected '=', ',', ';', 'asm' or '
__attribute__' before '{' token
.p {
lat ^
foIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:41,
rmi                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
o/p                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
ack                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
age                 from <command-line>:
s/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:22:1: error: unknown type name 'namespace'
fra namespace lgfx
me ^~~~w~o~r~k~-~e
sp.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Light_PWM.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '{' token
idf {
/co ^
mpoIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
nen                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
ts/                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
esp                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
_se                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
ria                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
l_s                 from <command-line>:
lav.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
e_l namespace lgfx
in ^~~~k~/~i~n~c~l
ud.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribu
te__' before '{' token
e - {
IC: ^
/UsIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
ers                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
/io                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
tde                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
v/.                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
pla                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
tfo                 from <command-line>:
rmi.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:1: error: unknown type name 'using'; did you mean '
ulong'?
o/p using namespace lgfx::jpeg_div;
ac ^~~~k~a
ge ulong
s/f.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
ram using namespace lgfx::jpeg_div;
ew                 ^~~~
ork.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:248:1: error: unknown type name 'using'; did you mean '
ulong'?
-es using namespace lgfx::colors;
pi ^~~~d~f
/c ulong
omp.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:248:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
one using namespace lgfx::colors;
nts                 ^~~~
/es.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:249:1: error: unknown type name 'using'; did you mean '
ulong'?
p_w using namespace lgfx::textdatum;
eb ^~~~s~o
c ulong
ket.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:249:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
_cl using namespace lgfx::textdatum;
ien                 ^~~~
t/i.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:250:1: error: unknown type name 'using'; did you mean '
ulong'?
nc using namespace lgfx::datum;
lu ^~~~d~e
 - ulong
IC:.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:250:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
/Us using namespace lgfx::datum;
ers                 ^~~~
/iotIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
dev                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
/.p                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
lat                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
for                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
mio                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
/pa                 from <command-line>:
cka.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
ges namespace lgfx
/f ^~~~r~a~m~e~w~o
rk.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribu
te__' before '{' token
-es {
pid ^
f/cIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
omp                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
one                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
nts                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
/e                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
xpa                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
t/e                 from <command-line>:
xpa.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
t/e namespace lgfx
xp ^~~~a~t~/~l~i~b
 -.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribu
te__' before '{' token
IC: {
/Us ^
ers.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:251:1: error: unknown type name 'using'; did you mean '
ulong'?
/io using namespace lgfx::attribute;
td ^~~~e~v
/. ulong
pla.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:251:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
tfo using namespace lgfx::attribute;
rmi                 ^~~~
o/pIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
ack                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
age                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
s/f                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
ram                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
ewo                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
rk-                 from <command-line>:
esp.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:1: error: unknown type name 'using'; did you mean '
ulong'?
idf using namespace lgfx::jpeg_div;
/c ^~~~o~m
po ulong
nen.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
ts/ using namespace lgfx::jpeg_div;
exp                 ^~~~
at/In file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
por                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
t/i                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
ncl                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
ude                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
 -I                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
C:/                 from <command-line>:
Us.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:1: error: unknown type name 'using'; did you mean 'u
long'?
ers using namespace lgfx::jpeg_div;
/i ^~~~o~t
de ulong
v/.p.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:252:1: error: unknown type name 'using'; did you mean
'ulong'?
lat using namespace lgfx::epd_mode;
fo ^~~~r~m
io ulong
/pa.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:248:1: error: unknown type name 'using'; did you mean '
ulong'?
cka using namespace lgfx::colors;
ge ^~~~s~/
fr ulong
ame.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:252:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
wor using namespace lgfx::epd_mode;
k-e                 ^~~~
spi.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:248:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
df/ using namespace lgfx::colors;
com                 ^~~~
ponIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
ent                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
s/w                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
ear                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
_le                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
vel                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
lin                 from <command-line>:
g/i.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
ncl namespace lgfx
ud ^~~~e~~ ~-~I~C
:/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribu
te__' before '{' token
Use {
rs/ ^
iotIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
dev                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
/.p                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
lat                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
for                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
mio                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
/pa                 from <command-line>:
cka.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
ges namespace lgfx
/f ^~~~r~a~m~e~w~o
rk.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribu
te__' before '{' token
-es {
pid ^
f/c.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:17: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'lgfx'
omp using namespace lgfx::jpeg_div;
one                 ^~~~
ntIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
s/f                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
atf                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
s/d                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
isk                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
io                  from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
-IC                 from <command-line>:
:/U.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
ser namespace lgfx
s/ ^~~~i~o~t~d~e~v
/..pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:23:1: error: expected '=', ',', ';', 'asm' or '__attribu
te__' before '{' token
pla {
tfo ^
rmi.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:248:1: error: unknown type name 'using'; did you mean '
ulong'?
o/p using namespace lgfx::colors;
ac ^~~~k~a
ge ulong
s/fIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
ra                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
mew                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
ork                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
-es                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
pid                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
f/c                 from <command-line>:
omp.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:1: error: unknown type name 'using'; did you mean '
ulong'?
one using namespace lgfx::jpeg_div;
nt ^~~~s~/
fa ulong
tfs/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:248:17: error: expected '=', ',', ';', 'asm' or '__att
ribute__' before 'lgfx'
vfs using namespace lgfx::colors;
 -I                 ^~~~
C:/In file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
Use                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
rs/                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
iot                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
dev                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
/.p                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
lat                 from <command-line>:
for.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:1: error: unknown type name 'using'; did you mean '
ulong'?
mio using namespace lgfx::jpeg_div;
/p ^~~~a~c
ka ulong
gesIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
/fr                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
ame                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
wor                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
k-e                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
spi                 from <command-line>:
df/.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:24:1: error: unknown type name 'namespace'
com namespace lgfx
po ^~~~n~e~n~t~s~/
f.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:249:1: error: unknown type name 'using'; did you mean 'ul
ong'?
atf using namespace lgfx::textdatum;
s/ ^~~~s~r
c  ulong
-ICIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
:/                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
Use                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
rs/                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
iot                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
dev                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
/.p                 from <command-line>:
lat.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:247:1: error: unknown type name 'using'; did you mean '
ulong'?
for using namespace lgfx::jpeg_div;
mi ^~~~o~/
pa ulong
ckaIn file included from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../Bus.hpp:22,
ges                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:56,
/fr                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/device.hpp:42,
ame                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1_init.hpp:22,
wor                 from .pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/LovyanGFX.hpp:31,
k-e                 from ./src/Boards/Lilygo-T-Display-S3.hpp:5,
spi                 from <command-line>:
df.pio/libdeps/lilygo-t-display-s3/LovyanGFX/src/lgfx/v1/platforms/esp32/../../misc/enum.hpp:22:1: error: unknown type name 'namespace'
/co namespace lgfx

Please also answer:

I suspect that you have forgotten a closing bracket or semicolon somewhere when editing your code or have inserted too many. This can lead to error messages being shown later in other header files.

I think I have found were the problem comes from.

As I’m using 2 different boards, I defined 2 “env” sections in the platformio.ini file. As I needed 2 LGFX board config files, I used those lines in the env section of the board 1 and same method for the second board :

build_flags= ... -include [LGFX board 1 (.hpp) header file]

In platformio documentation, it is mentionned that :

-include file : Process *file* as if #include “file” appeared as the first line of the primary source file.

ref.: https://docs.platformio.org/en/stable/projectconf/sections/env/options/build/build_flags.html

But it doesn’t seem to have the same behavior as if I include this line in my main.cpp file directly (this is working fine) :

#include [LGFX board 1 (.hpp) header file]

So, why isn’t building correctly when using the platormio.ini file ?

Great that you found the cause of the error! :+1:

I have never used -include.

The documentation says that it has the same effect as #include in the “primary source file”. Question: What is the primary source file in an Arduino project?
Is it the main.cpp from the Arduino core? :thinking: I do not know. :man_shrugging:

So I would always use regular #include statements in my source files.

But it would not serve my needs to include it directly. So the problem is not solved.

In fact, I know the file is found using -include in platformio.ini, but the compilation seems to be done in C and not in C++.

@ivankravets and/or @maxgerhardt : could you please help on this please ?

If you pass include to the global environment, it will affect related frameworks and libraries. Could you try passing this option to build_src_flags — PlatformIO latest documentation ?

1 Like

Thank you for your quick reply @ivankravets.

I forgot to mention that the related .hpp and .cpp are under the lib folder, not in the src folder. I guess that build_src_flags would then not be useful ? (unless I didn’t understand)

This line is in the platformio.ini file :

build_flags = ... -include lib/boards/Lilygo-T-Display-S3.hpp

I followed your advice and it worked !

		build_src_flags =
			${env.build_src_flags}
			;needed for LovyanGFX (LGFX)
			-include lib/boards/Lilygo-T-Display-S3.hpp

Thank you so much !