-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
master branch does not compile with lvgl master branch #98
Comments
I compile LittlevGL with many warnings enabled and I only get warnings from one file. What warnings are you using?
Fixed here: 627b3d1
I'm not entirely sure why these are enabled out-of-the-box. The folder structure they're assuming appears to predate 6.0 so I'm guessing these haven't been updated in a while. |
Sorry, it's my fault. During merging branches I messed up something. I reverted it, and now should work. |
Ok - jumping back will eliminate those issues ;-) but I still get one warning type ( /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h: In function ‘void lv_color_mix_with_alpha(lv_color_t, lv_opa_
t, lv_color_t, lv_opa_t, lv_color_t*, lv_opa_t*)’:
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:536:47: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::green’ [-Wmissing-field-initializers]
static lv_color_t fg_color_save = {{0}};
^ I'm not sure but I think those warnings were emitted also in the past ... |
Great!
That's strange why it complains only about |
sorry my last comment may be misleading: I'm using gcc with the additional compiler settings pi@raspi3b:~ $
> gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
yep: |
Test run with these settings and it doesn't show warnings. Could you send the whole build log and your lv_conf.h? |
You are right ! [ 89%] Building CXX object CMakeFiles/rfm96_test.dir/gui.cpp.o
In file included from /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/lv_hal_disp.h:21,
from /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/lv_hal.h:16,
from /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/lvgl.h:22,
from /home/pi/work/lora/Rfm96Raspberry/Application/lv_drivers/display/fbdev.h:29,
from /home/pi/work/lora/Rfm96Raspberry/Application/gui.h:12,
from /home/pi/work/lora/Rfm96Raspberry/Application/gui.cpp:8:
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h: In function ‘void lv_color_mix_with_alpha(lv_color_t, lv_opa_
t, lv_color_t, lv_opa_t, lv_color_t*, lv_opa_t*)’:
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:536:47: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::green’ [-Wmissing-field-initializers]
static lv_color_t fg_color_save = {{0}};
^
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:536:47: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::red’ [-Wmissing-field-initializers]
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:537:47: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::green’ [-Wmissing-field-initializers]
static lv_color_t bg_color_save = {{0}};
^
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:537:47: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::red’ [-Wmissing-field-initializers]
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:538:49: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::green’ [-Wmissing-field-initializers]
static lv_color_t res_color_saved = {{0}};
^
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:538:49: warning: missing initializer for member ‘lv_color16_t:
:<unnamed struct>::red’ [-Wmissing-field-initializers] But in the end, due to the static c implementation of lvgl, I had to make so many "exceptions" in the class that it really doesn't make sense to force a Reverting back the code to Thanks for your support !! |
We should still fix it, as C++ code should be able to include public headers without warnings. |
OK, fine ! Adding the missing parts (in my case green and blue because of e.g. replacing line 536: But due to the different implementation possibilities (dependency on |
I fixed it like this: 966b4b11 Do you still see the warning? |
No - no warnings anymore (for both c and cpp) 👍 |
Great! I guess we can close this issue then. |
Great! :) |
Hi !
I'm running into trouble by using both repositories with the current master branch.
Maybe the lvgl update to V7 is not considered fully in lv_drivers - I found the following issues:
wrong header file location
The lv_drv_conf_templ.h has 3 devices enabled per default
#define USE_SSD1306 1
#define USE_SSD1306 1
#define USE_AR10XX (1)
Additionally for these devices the normally used code template is missing:
This leads for all 3 devices to a header include error
fatal error: lvgl/lv_misc/lv_color.h: No such file or directory #include "lvgl/lv_misc/lv_color.h"
The lv_color.h file is found at lvgl/src/lv_misc/lv_color.h
(quickly fixed by disabling the drivers which are not used in my project anyway)
the cpp keyword "template" is used as function argument
I'm using the lvgl framework in a c/cpp project and this error pops up after updating to master branch
In file included from /home/pi/work/lora/Rfm96Raspberry/Application/lv_drivers/display/fbdev.h:20, from /home/pi/work/lora/Rfm96Raspberry/Application/gui.h:12, from /home/pi/work/lora/Rfm96Raspberry/Application/main.cpp:9: /home/pi/work/lora/Rfm96Raspberry/Application/lv_drivers/display/../../lv_drv_conf.h: At global scope: /home/pi/work/lora/Rfm96Raspberry/Application/lv_drivers/display/../../lv_drv_conf.h:235:70: error: expected ‘,’ or ‘...’ before ‘template’ static inline int lv_spi_repeat(lv_spi_handle_t spi_dev, const void* template, uint32_t repeats, uint8_t template_size)
Renaming the function argument template in lv_drv_conf_templ.h fixes this issue.
warnings
Compiling the master branch shows a lot of new warnings, mainly
warning: unused parameter
warning: no return statement in function
Currently I'm ignoring this warning and after fixing the other issues temporarily my little demo application is running nearly the same as for V6 (except of the look and feel due to the changed theme handling ;-) )
The text was updated successfully, but these errors were encountered: