#10760·lvgl

Compilation error when enabling `LV_USE_CHECK_OBJ_CLASSTYPE`

Author: arturv2000Created Sep 23, 2026Updated Sep 24, 2026

LVGL version

v9.6.0

Platform

Visual Studio Code Simulator on Windows (using mingw64 to compile)

What happened?

Was playing with enabling the several "asserts" that there are in lv_conf.h and when enabling LV_USE_CHECK_OBJ_CLASSTYPE there are compilation errors

bash
error: 'obj_class' undeclared (first use in this function); did you mean 'lv_obj_class'?

At lines:

https://github.com/lvgl/lvgl/blob/8781d6b7dfaf4e92970bb2d13b529e65d4670ce3/src/widgets/arc/lv_arc.c#L491

https://github.com/lvgl/lvgl/blob/8781d6b7dfaf4e92970bb2d13b529e65d4670ce3/src/widgets/arc/lv_arc.c#L512

https://github.com/lvgl/lvgl/blob/8781d6b7dfaf4e92970bb2d13b529e65d4670ce3/src/widgets/span/lv_span.c#L798

Was using branch release/v9.6 but also happens on master.

How to reproduce?

Enable LV_USE_CHECK_OBJ_CLASSTYPE and try to build.