Important: unclear posts may not receive useful answers.
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
- Read the
Delete this section if you read and applied the mentioned points.
Compiling LVGL V8.0, encountered some errors
What MCU/Processor/Board and compiler are you using?
What do you want to achieve?
What have you tried so far?
When I set _LV_COLOR_HAS_MODERN_CPP to 0, the error disappeared, but I don’t want to solve the problem this way. What should be wrong.
Code to reproduce
Add the relevant code snippets here.
The code block(s) should be between
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
Something is confusing the logic which decides the value of
_LV_COLOR_HAS_MODERN_CPP - it should always be 0 in a C environment.
Perhaps you have
__cplusplus defined even though you are compiling a C file?
When I forced _LV_COLOR_HAS_MODERN_CPP to 0, the error disappeared. I use the GCC 10.2 compiler, can I ask you a basic question? Where is __cplusplus defined?How to undefine __cplusplus?
__cplusplus should only be defined if you are compiling a C++ file. If it is defined when compiling a C file, there is something wrong with your specific project.