The definition of the img_lv_demo_music_cover_1 variable is found inside a #if LV_USE_DEMO_MUSIC block. That variable is used inside the lv_ex_img_3 example function, referenced using an extern declaration. If LV_USE_DEMO_MUSIC is not defined then the compilation fails with the following message in visual studio (for example).
Error LNK2001 unresolved external symbol img_lv_demo_music_cover_1 lv_sim_visual_studio_sdl C:\Users\mikef\source\repos\lv_sim_visual_studio_sdl\visual_studio_2017_sdl\lv_ex_img_3.obj 1
This could be fixed in a number of ways but I'm not sure what the vision for lv_ex_img_3 was. It seems odd that it pulls in a variable from the assets in the lv_demo_music directory tree. You could define LV_USE_DEMO_MUSIC inside the lv_ec_img_3.c file but that would seem like a misuse of that macro. Move that asset out of the lv_demo_muse and into the more general src/assets directory? Do not wrapt the definition of img_lv_demo_music_cover_1 in the #if/#endif block?
The definition of the img_lv_demo_music_cover_1 variable is found inside a
#if LV_USE_DEMO_MUSIC
block. That variable is used inside the lv_ex_img_3 example function, referenced using anextern
declaration. If LV_USE_DEMO_MUSIC is not defined then the compilation fails with the following message in visual studio (for example).This could be fixed in a number of ways but I'm not sure what the vision for lv_ex_img_3 was. It seems odd that it pulls in a variable from the assets in the lv_demo_music directory tree. You could define LV_USE_DEMO_MUSIC inside the lv_ec_img_3.c file but that would seem like a misuse of that macro. Move that asset out of the lv_demo_muse and into the more general src/assets directory? Do not wrapt the definition of img_lv_demo_music_cover_1 in the #if/#endif block?