I just updated my PROS Kernel ( which was updated sometime last year) with the “prosv5 conductor upgrade” command as support for the IMU’s ( Inertial sensors ) will be released soon. I went to compile my code with the “make all” command to check that all my code from before still worked. However when linking to the pros library it raises an error with the constructor of my scr class in my screen.cpp file. I’m not to sure why updating the Kernel would create this issue and I need help with resolving it. (Sorry to anyone if this is a dumb question and I’m just missing something obvious)
Upgrading the kernel upgraded LVGL to 5.3, which may have introduced some breaking changes.
However, your problem seems to be with the way you structured your files.
You have the styles forward declared using extern lv_style_t arcade_24;
, and you access it in your code, yet you did not show anywhere where you actually define the style object.
When you forward declare something in a header, you still need it to have “a home”, meaning it still has to be defined somewhere in a single source file.
The styles are declared in “arcade_24.c” (and other font files) while the extern keyword allows other source files to recognize and find the struct that exists in the font files. Unless I’m not understanding correctly, I have tried to use the extern keyword in the source files but the same error occurred
The styles are declared in “arcade_24.c” (and other font files) while the extern keyword allows other source files to recognize and find the struct that exists in the font files. Unless I’m not understanding correctly, I have tried to use the extern keyword in the source files but the same error occurred.
it looks like the font may be defined in “.c” files, in which case you need to define them as extern “C”
for use in “.cpp” files.
yea, use extern “C” n the C++ files not the C files (screen.h etc.)
extern "C" {
lv_font_type arcade_24;
// etc..
}
Actually, the likely problem is that when you upgraded LVGL, the USE_ARCADE_36
defines got removed, either due to API changes or the upgrade overwrote any custom changes you made to lv_conf.h
.
Hopefully you were tracking your project with git so you can see the change.
Either put the defines back into lv_conf.h
, or remove the macros in your source file.
Yup that worked, I probably should’ve realized that hahaha, thank you so much for your help though!
Huh, never considered that people would want to edit lv_conf.h
That said, I don’t really want to mark it as a “user” file because LVGL upgrades do change the contents of the file somewhat (as we’ve seen in this thread).
I’d recommend not putting anything in that file specifically and instead using your own headers