lvgl / lv_port_win_codeblocks

Windows PC simulator project for LVGL embedded GUI Library
MIT License
150 stars 86 forks source link

Codeblocks reports some build errors: "sorry, unimplemented: non-trivial designated initializers not supported" #25

Closed mirkorugge closed 2 years ago

mirkorugge commented 3 years ago

Hi, I tried to build the last project taken from the Git, but Codeblocks (20.03) report to me some errors:

immagine

Below the complete list of errors:

||=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_stress\assets\lv_font_montserrat_12_compr_az.c|312|sorry, unimplemented: non-trivial designated initializers not supported| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_stress\assets\lv_font_montserrat_16_compr_az.c|350|sorry, unimplemented: non-trivial designated initializers not supported| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_stress\assets\lv_font_montserrat_28_compr_az.c|500|sorry, unimplemented: non-trivial designated initializers not supported| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|204|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|205|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|206|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|208|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|203|warning: 'img_lvgl_logo' defined but not used [-Wunused-variable]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|256|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|257|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|258|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|260|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|255|warning: 'img_clothes' defined but not used [-Wunused-variable]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void color_changer_anim_cb(void, int32_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|997|error: invalid conversion from 'void' to 'lv_obj_t {aka _lv_obj_t}' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void color_changer_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1023|error: invalid conversion from 'void' to 'lv_obj_t {aka _lv_obj_t}' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void color_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1061|error: invalid conversion from 'void' to 'lv_palette_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1062|error: invalid conversion from 'int' to 'lv_palette_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1063|error: invalid conversion from 'int' to 'lv_palette_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void ta_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1181|error: invalid conversion from 'void' to 'lv_obj_t {aka _lv_obj_t}' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void calendar_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1233|error: invalid conversion from 'void' to 'lv_obj_t {aka _lv_obj_t}' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void slider_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1256|error: invalid conversion from 'void' to 'lv_coord_t {aka short int}' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1259|error: invalid conversion from 'void' to 'lv_obj_draw_part_dsc_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void chart_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1303|error: invalid conversion from 'void' to 'lv_obj_draw_part_dsc_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1353|error: invalid conversion from 'const void' to 'const lv_chart_series_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void shop_chart_event_cb(lv_event_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1419|error: invalid conversion from 'void' to 'lv_obj_draw_part_dsc_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1430|error: invalid conversion from 'void' to 'lv_obj_draw_part_dsc_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter1_indic1_anim_cb(void, int32_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1469|error: invalid conversion from 'void' to 'lv_meter_indicator_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|232|note: initializing argument 2 of 'void lv_meter_set_indicator_end_value(lv_obj_t, lv_meter_indicator_t, int32_t)'| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter1_indic2_anim_cb(void, int32_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1478|error: invalid conversion from 'void' to 'lv_meter_indicator_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|232|note: initializing argument 2 of 'void lv_meter_set_indicator_end_value(lv_obj_t, lv_meter_indicator_t, int32_t)'| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter1_indic3_anim_cb(void, int32_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1488|error: invalid conversion from 'void' to 'lv_meter_indicator_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|232|note: initializing argument 2 of 'void lv_meter_set_indicator_end_value(lv_obj_t, lv_meter_indicator_t, int32_t)'| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter2_timer_cb(lv_timer_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1497|error: invalid conversion from 'void' to 'lv_meter_indicator_t*' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter3_anim_cb(void, int32_t)':| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1556|error: invalid conversion from 'void' to 'lv_meter_indicator_t' [-fpermissive]| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|216|note: initializing argument 2 of 'void lv_meter_set_indicator_value(lv_obj_t, lv_meter_indicator_t, int32_t)'| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|712|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|713|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|714|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|716|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|711|warning: 'animimg001' defined but not used [-Wunused-variable]| ||=== Build failed: 33 error(s), 3 warning(s) (0 minute(s), 0 second(s)) ===| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|648|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|649|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|650|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|652|error: expected primary-expression before '.' token| C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|647|warning: 'img_demo_widgets_avatar' defined but not used [-Wunused-variable]| ||=== Build failed: 37 error(s), 4 warning(s) (0 minute(s), 0 second(s)) ===|

I can't understand how solve the above errors.

Many Thanks

embeddedt commented 3 years ago

Unfortunately, I'm not able to reproduce this; the project compiles just fine for me locally.

Have you used CodeBlocks for any other projects in the past or is this a fresh installation?

mirkorugge commented 3 years ago

Hi, many thanks for your kindly answer.

I use for other projects the Codeblocks 17.23 version. However I made a parallel installation (in an other directory) of the Codeblocks 20.03 version downloaded from the link present in tutorial "pc_simulator_win_codeblocks" page. With the fresh Codeblocks 20.03 IDE installation I compiled only your simulator project, anyway in order to solve some errors I had to add in the "Build Option", "Search Directories" my path "..\Program Files\CodeBlocks2003\MinGW\x86_64-w64-mingw32\include" and in the "Compiler Settings", "#defines" the label UNICODE. After that when I compile the project I recieve the above error messages.

It seems the compiler don't like the initializzation without the label before the dot in a structure...for example: immagine

I think probably there are some settings to modify in the "Build option", but I am not sure. immagine

Many thanks in avance for your attemption.

embeddedt commented 3 years ago

It looks like it's treating the font file as a C++ file, which is strange, since it should have a .c extension. C++ doesn't support those initializers fully, but C should.

mirkorugge commented 3 years ago

I tried to change some flags combination in the "compiler flags" without good result. Please may you tell me wich flags I have to tag in the project?

Many Thanks.

stale[bot] commented 2 years ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.