What do you want to achieve?
I want to create an executable from the generated UI code using the generated cmake file
What have you tried so far?
I successfully compiled and created an executable for the LVGL example project using the SDL2 simulator, so I know it works. I am trying to recreate this but instead of the LVGL example, have it run my SquareLine generated UI code. I have:
1: Added “add_subdirectory(ui)” in the highest level CMakeLists.txt file as stated in SquareLine documentation
2: when running make, compiles all the way, but gives the error shown below (Undefined symbols, _ui_init, referenced from: _main in main.c.o, when I try to use “ui_init()” in main.c
3: If I remove ui_init() from main.c, the project compiles and creates the executable, so I am assuming something is wrong with the cmake causing it to not find the functions in the ui.h file
Thanks in advance, new user
Screenshot or video
Terminal showing successful compiling, but final error where it can’t find ui_init in my main.c
Top level CMakeLists.txt file showing the “add_subdirectory(ui)”, as said to call by SquareLine documentation
Main.c showing the lv_init() and ui_init() calls (will implement the SDL2 later)
Folder structure, all SquareLine generated ui files are in the “ui” folder
Others
- **SquareLine Studio version: latest
- **Operating system: macOS
- **Target hardware: MacOS (then Raspberry PI)