lovyan03 / LovyanGFX

SPI LCD graphics library for ESP32 (ESP-IDF/ArduinoESP32) / ESP8266 (ArduinoESP8266) / SAMD51(Seeed ArduinoSAMD51)
Other
1.19k stars 209 forks source link

Please give a compilation guide based on ESP-IDF #312

Closed hero closed 1 year ago

hero commented 1 year ago

Carefully written requests are more likely to be given priority. I tried to use this library to drive SSD1351 OLED in my ESP32-S3 project, but the compilation failed! My compile condition:

Many errors like:

1) LovyanGFX/src/lgfx/v1/platforms/esp32/../../Light.hpp:22:1: error: unknown type name 'namespace' namespace lgfx ^~~~~ 2)error: expected '=', ',', ';', 'asm' or 'attribute' before 'lgfx' using namespace lgfx::jpeg_div; ^~~~ 3)error: unknown type name 'using'; did you mean 'ulong'? using namespace lgfx::colors; ^~~~~ 4)LovyanGFX/src/lgfx/v1/platforms/esp32/../esp32/../../../utility/../internal/memory.h:13:10: fatal error: memory: No such file or directory

include

      ^~~~~~~~

compilation terminated.



**Describe the solution you'd like**
Please give a compilation guide based on ESP-IDF. 

**Additional context**
I've found the C++ support here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/cplusplus.html
But it still didn't help#~_~!!
lovyan03 commented 1 year ago

This library is written in C++ and cannot be included from *.c source.

sukesh-ak commented 1 year ago

@hero

Your ESP-IDF main function should look like this and in a .cpp file to use C++.

extern "C" void app_main(void)
{

}
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.