This is probably more of an ESP-IDF question but asking here as it’s to do with configuring LVGL.
So I am using a Waveshare 7" ESP32-P4 development board which uses LVGL 9.2.2 and the drivers in the example they give. This all builds no problem and flashes etc so I know the environment is generally set up correctly. It’s using the esp-idf VScode extension which means there isn’t a need for an lv_conf.h in the example.
So I am now trying to use LVGL Pro to do some UX design and moving the example to running a generated UX through the tool.
However when compiling I get the following error
testing_gen.c:46:5: error: implicit declaration of function ‘lv_obj_set_name_static’; did you mean ‘lv_obj_set_state’? [-Wimplicit-function-declaration]
46 | lv_obj_set_name_static(lv_obj_0, “testing_#”);
| ^~~~~~~~~~~~~~~~~~~~~~
| lv_obj_set_state
So the call to lv_obj_set_name_static is in the LVGL Pro auto generated code from the XML so I clearly need to address this rather than edit the code.
from what I can determine it looks like I need to define
LV_USE_OBJ_ID=1
but I haven’t found a way to get this to work with the esp-idf extension.
I’ve tried to put an lv_conf.h in my build but that caused issues with error saying the header file didn’t exist, which it clearly does, so I’ve gone back to trying to work out how to define this separately.
I’ve tried idf_build_set_property(COMPILE_OPTIONS “-DLV_USE_OBJ_ID=1” APPEND) in the top level CMakeLists.txt but that hasn’t helped, I’ve tried defining it in a number of other places too but no joy as yet.
Am I trying to take this the wrong way entirely? I’m clearly missing something.
Thanks
Pete