I am going to use LVGL with C++.
During the compilation I face some issues with the include files.
lv_types.h
When it is included in C++ file, STDC_VERSION is not defined and evaluates to 0.
"This macro is not defined if the -traditional-cpp option is used, nor when compiling C++ or Objective-C. "
For 2, since these are static variables inside a function, they should be initialized to 0 automatically, and the initializer should not be necessary. Can you remove it and confirm that it works?
As for 2 there is one more line with designated initializers #if LV_COLOR_DEPTH == 1 #define LV_COLOR_MAKE(r8, g8, b8) (_LV_COLOR_MAKE_TYPE_HELPER{.full = (uint8_t)((b8 >> 7) | (g8 >> 7) | (r8 >> 7))})