So im revamping my GUI, and am having problems with LVGL all of a sudden. I use LVGL to print a photo, and pros screen functions for the touch input. I have 10 photos, 5 of which are giving the “undefined” error, code & errors below. This also only happens when building.
//declaring the photos
LV_IMG_DECLARE(MainGuiPB);
LV_IMG_DECLARE(SkillsGui);
LV_IMG_DECLARE(Settings);
LV_IMG_DECLARE(PidConfigAng);
LV_IMG_DECLARE(PidConfigLat);
//these 5 are giving errors
LV_IMG_DECLARE(DiagnosticsPB);
LV_IMG_DECLARE(RedLeftAutonPB);
LV_IMG_DECLARE(RedRightAutonPB);
LV_IMG_DECLARE(BlueRightAutonPB);
LV_IMG_DECLARE(BlueLeftAutonPB);
//Excerpt of code that is giving an error
while (Screen1) {
auto status = pros::screen::touch_status();
if( (status.x >= 0 && status.x <= 120) && (status.y >= 120 && status.y <= 240) && status.touch_status == TOUCH_PRESSED) {
lv_img_set_src(GuiImg, &RedLeftAutonPB);
**Error Below **
//Excerpt of code that ISNT giving an error
if( (status.x >= 240 && status.x <= 480) && (status.y >= 0 && status.y <= 45) && status.touch_status == TOUCH_PRESSED) {
lv_img_set_src(GuiImg, &Settings);
Not sending analytics for this command.
Compiled src/BlueLeftAutonPB.c [OK]
Compiled src/BlueRightAutonPB.c [OK]
Compiled src/DiagnosticsPB.c [OK]
Compiled src/MainGuiPB.c [OK]
Compiled src/PidConfigAng.c [OK]
Compiled src/PidConfigLat.c [OK]
Compiled src/RedLeftAutonPB.c [OK]
Compiled src/RedRightAutonPB.c [OK]
Compiled src/Settings.c [OK]
Compiled src/SkillsGui.c [OK]
Adding timestamp [OK]
Linking hot project with ./bin/cold.package.elf and LemLib,libc,liblvgl,libm,libpros [ERRORS]
C:/Users/mrder/AppData/Roaming/Code/User/globalStorage/sigbots.pros/install/pros-toolchain-windows/usr/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: bin/hot.package.elf has a LOAD segment with RWX permissions
C:/Users/mrder/AppData/Roaming/Code/User/globalStorage/sigbots.pros/install/pros-toolchain-windows/usr/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: bin/main.cpp.o: in function `initGUI()':
c:\Users\mrder\Desktop\robotics drive backup\GUITESTING/src/main.cpp:322:(.text._Z7initGUIv+0x40c): undefined reference to `RedLeftAutonPB'
C:/Users/mrder/AppData/Roaming/Code/User/globalStorage/sigbots.pros/install/pros-toolchain-windows/usr/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: c:\Users\mrder\Desktop\robotics drive backup\GUITESTING/src/main.cpp:322:(.text._Z7initGUIv+0x428): undefined reference to `RedRightAutonPB'
C:/Users/mrder/AppData/Roaming/Code/User/globalStorage/sigbots.pros/install/pros-toolchain-windows/usr/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: c:\Users\mrder\Desktop\robotics drive backup\GUITESTING/src/main.cpp:322:(.text._Z7initGUIv+0x438): undefined reference to `DiagnosticsPB'
C:/Users/mrder/AppData/Roaming/Code/User/globalStorage/sigbots.pros/install/pros-toolchain-windows/usr/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: c:\Users\mrder\Desktop\robotics drive backup\GUITESTING/src/main.cpp:547:(.text._Z7initGUIv+0xe58): undefined reference to `BlueRightAutonPB'
C:/Users/mrder/AppData/Roaming/Code/User/globalStorage/sigbots.pros/install/pros-toolchain-windows/usr/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: c:\Users\mrder\Desktop\robotics drive backup\GUITESTING/src/main.cpp:547:(.text._Z7initGUIv+0xe74): undefined reference to `BlueLeftAutonPB'
collect2.exe: error: ld returned 1 exit status
make: *** [common.mk:252: bin/hot.package.elf] Error 1
ERROR - pros.cli.build:make - Failed to make project: Exit Code 2 - pros-cli version:3.5.5
PROS-CLI Version: 3.5.5
PROS-Kernel Version: 4.1.0
+- Error
---------------------------------------------------------------------+
| Failed to build |
+-----------------------------------------------------------------------------+
Sentry is attempting to send 1 pending events
Waiting up to 2 seconds
Press Ctrl-Break to quit