Compiling LVGL V8.0, encountered some errors

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Read the

Delete this section if you read and applied the mentioned points.

Description

Compiling LVGL V8.0, encountered some errors

What MCU/Processor/Board and compiler are you using?

stm32f103,GCC10.0

What do you want to achieve?

Successfully compiled

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 ```c and ``` tags:

/*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?

thank you.
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?

With GCC, __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.