I tried to compile and build an example but got `undefined reference to main` - Ubuntu

What MCU/Processor/Board and compiler are you using?

x86_64
OS: Ubuntu 22.10
LVGL: 8.3

What do you want to achieve?

A working plain simple starter example

lv_example_get_started_1.h :

I managed to compile both lvgl and lv_drivers:

    /home/raphy/LVGL/lvgl/demos/widgets/../../src/misc/../lv_conf_internal.h:46:17: note: ‘#pragma message: Possible failure to include lv_conf.h, please read the comment in this file if you get errors’
       46 |         #pragma message("Possible failure to include lv_conf.h, please read the comment in this file if you get errors")
          |                 ^~~~~~~
    [100%] Linking C static library liblvgl_demos.a
    [100%] Built target lvgl_demos

    raphy@raohy:~/LVGL/lv_drivers$ cmake --build build
    [ 95%] Building C object CMakeFiles/lv_drivers.dir/win_drv.c.o
    [100%] Linking C static library lib/liblv_drivers.a
    [100%] Built target lv_drivers
    raphy@raohy:~/LVGL/lv_drivers$ 

I tried to compile and build an example but got 'undefined reference to main` :

raphy@raohy:~/LVGL/lvgl/examples/widgets/menu$ g++ lv_example_menu_1.c -std=c++17 -I ../../../src/ -I ../../../../lv_drivers/src -L ../../../build/lib -L ../../../../lv_drivers/build/lib/ -llvgl -o example_menu_1
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status

What am I missing, and what do I have to do in order to make it work?

Try to use this project to compile: