Undefined reference to `lv_font_montserrat_48'

I am not understanding why this error is in the ui_Screen1.c.o file and how i can resolve it.

Linking .pio\build\4d_systems_esp32s3_gen4_r8n16\firmware.elf
c:/users/91704/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: .pio/build/4d_systems_esp32s3_gen4_r8n16/src/ui/src/screens/ui_Screen1.c.o:(.literal.ui_Screen1_screen_init+0xc): undefined reference to `lv_font_montserrat_24'

What have you tried so far?

When I change it to lv_font_montserrat_14 i.e. default value, no error occurs, but any other font, this error occurs

Others

  • SquareLine Studio version: 1.4.0
  • Operating system: Windows Platform Io
  • Target hardware: ESP32 S3

There have been several reports on the forum about this situation (you can check them for more details/scenarios), the usual problem with compiling/linking other sizes of built-in fonts is that lv_conf.h (or sdkconfig in case of ESP-IDF) doesn’t have the extra fonts enabled, so LVGL doesn’t provide those built-in fonts to the UI-source with that size. SquareLine Studio enables these fonts (sets them to 1) in lv_conf.h but if that lv_conf.h is not reachable or another lv_conf.h is used by LVGL in your configuration, that can cause this problem. In these cases you can set these manually in lv_conf.h (or sdkconfig through idf.py menuconfig in ESP-IDF).

If I enabled fonts 24 and 48 in lv_conf.h as 1, then why is this error in the .c.o file of UI_Screen1 during building?
Last time when I worked with SquarelineStudio 1.3.1, it worked but now its not working in 1.3.1 as well as 1.4.0
so is it a bug or compiler issue?

Maybe a difference of the build-system/compiler what causes the same version’s export fail now, from these symptoms I would say so. There were from forum topics with similar issues, where the export was fine but compilation/linking failed: Large Font Issue with Arduino IDE and GIGA R1

You might have to go to folder if using arduino.

mbed_giga/libraries/Arduino_H7_Video/src/lv_conf.h

and then change the fonts in that folder.
This is not the exact folder but it’s an example of changing the font in the driver that you use for your controller

1 Like

Thanks for sharing this information. It has been a problem with GigaShield compilations for a wile.