I faced “undefined reference to `lv_linux_fbdev_create’” error message. How can I solve it?
I’m using lvgl lastest version. and I’d like to use lvgl library on linux embedded device.
I tested it as below:
$ cd ./lvgl
$ mkdir ./build && cd ./build
$ cmake ..
$ make -j
added lvgl.mk file and liblvgl.a file on the my project Makefile
...
LVGL_DIR_NAME = lvgl #The name of the lvgl folder (change this if you have renamed it)
LVGL_DIR = ${shell pwd} #The path where the lvgl folder is
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/lvgl.mk
...
$(TARGETS): %: %.c Makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LVGL_LIB)/liblvgl.a
...
Following the instructions above on a Raspberry Pi 4 running Raspberry Pi OS Lite (64 bit) - Bookworm it compiles and runs without the undefined reference problem you mention. The only additional requirement is that cmake be installed.
Your response has no information that anyone can use to help you. If you want help, then try to provide some detail of significance that could help diagnose your problem.
For example, what MCU/Processor/Board and compiler are you using ? How does your platform differ from what I have described above ? What other distinguishing information of significance can you provide ?