Step-by-step Guide: How to use the LVGL v9 LCD drivers with STM32 devices

Reference is made to guide which is located
https://docs.lvgl.io/master/details/integration/driver/display/lcd_stm32_guide.html

I have passed all steps described in this guide and I am getting error in function ui_init()
error: ‘widget’ undeclared (first use in this function)
What is my mistake ?

Are you sure you do all points specialy 39,41 …?

It looks that I have done all correctly. 39, 41 are included.
I have error in this part of ui_init() function

lv_obj_set_align(widget, LV_ALIGN_CENTER);
lv_obj_set_height(widget, LV_SIZE_CONTENT);
lv_obj_set_width(widget, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(widget, &lv_font_montserrat_14, 0);
lv_obj_set_style_text_color(widget, lv_color_black(), 0);
lv_label_set_text(widget, “Hello World!”);

When I change widget to obj project is being built correctly. Can someone confirm that it is correct ? Those are my first steps with LVGL and I am not familiar with library.

Show complete ui_init and learn basic C rules.

The ui_init function as in item 48 of guide
void ui_init(lv_display_t *disp)
{
lv_obj_t *obj;

                /* set screen background to white */
                lv_obj_t *scr = lv_screen_active();
                lv_obj_set_style_bg_color(scr, lv_color_white(), 0);
                lv_obj_set_style_bg_opa(scr, LV_OPA_100, 0);

                /* create label */
                obj = lv_label_create(scr);
    lv_obj_set_align(widget, LV_ALIGN_CENTER);
    lv_obj_set_height(widget, LV_SIZE_CONTENT);
    lv_obj_set_width(widget, LV_SIZE_CONTENT);
    lv_obj_set_style_text_font(widget, &lv_font_montserrat_14, 0);
    lv_obj_set_style_text_color(widget, lv_color_black(), 0);
    lv_label_set_text(widget, "Hello World!");
        }

Yes widget is here absurd. As i write basic C knowledge…

I assume that remark about absurd is directed to author of this tutorial. It means that code was not checked in action.
Probably he was in a great hurry. A man creating such manual must have the good knowledge in programming.

Thanks…
I got it…

No hurry, but maybe have widget as global, and you when have basic C knowledge, see that simply require add global to your code.
C isnt LEGO.