lvgl / lv_port_win_codeblocks

Windows PC simulator project for LVGL embedded GUI Library
MIT License
143 stars 88 forks source link

Codeblocks reports some build errors: #29

Closed samuelwhg closed 2 years ago

samuelwhg commented 2 years ago

hi some errors:

-------------- Build: Debug in LittlevGL (compiler: GNU GCC Compiler)---------------

gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c -o obj\Debug\lv_drivers\win32drv\win32drv.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\img_hand.c -o obj\Debug\lvgl\examples\assets\img_hand.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\img_skew_strip.c -o obj\Debug\lvgl\examples\assets\img_skew_strip.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\img_star.c -o obj\Debug\lvgl\examples\assets\img_star.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\imgbtn_left.c -o obj\Debug\lvgl\examples\assets\imgbtn_left.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\imgbtn_mid.c -o obj\Debug\lvgl\examples\assets\imgbtn_mid.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\imgbtn_right.c -o obj\Debug\lvgl\examples\assets\imgbtn_right.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\get_started\lv_example_get_started_1.c -o obj\Debug\lvgl\examples\get_started\lv_example_get_started_1.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\get_started\lv_example_get_started_2.c -o obj\Debug\lvgl\examples\get_started\lv_example_get_started_2.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\get_started\lv_example_get_started_3.c -o obj\Debug\lvgl\examples\get_started\lv_example_get_started_3.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_1.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_1.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_2.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_2.o D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:59:5: error: unknown type name '_Inopt' 59 _Inopt HWND WindowHandle, ^~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:60:5: error: unknown type name 'In' 60 In LONG Width, ^~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:61:5: error: unknown type name 'In' 61 In LONG Height, ^~~~ gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_3.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_3.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_4.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_4.o gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_5.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_5.o D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:62:5: error: unknown type name 'Out' 62 Out UINT32** PixelBuffer, ^~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:63:5: error: unknown type name 'Out' 63 Out SIZE_T* PixelBufferSize); ^~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:76:5: error: unknown type name 'In' 76 In HWND WindowHandle); ^~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:105:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'? 105 HTOUCHINPUT hTouchInput, ^~~ PTOUCHINPUT D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:120:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'? 120 HTOUCHINPUT hTouchInput); ^~~ PTOUCHINPUT D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:128:5: error: unknown type name 'In' 128 In HWND WindowHandle); ^~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:164:15: warning: 'lv_win32_quit_signal' initialized and declared 'extern' 164 EXTERN_C bool lv_win32_quit_signal = false; ^~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:166:22: warning: 'lv_win32_pointer_device_object' initialized and declared 'extern' 166 EXTERN_C lv_indev_t* lv_win32_pointer_device_object = NULL; ^~~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:167:22: warning: 'lv_win32_keypad_device_object' initialized and declared 'extern' 167 EXTERN_C lv_indev_t* lv_win32_keypad_device_object = NULL; ^~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:168:22: warning: 'lv_win32_encoder_device_object' initialized and declared 'extern' 168 EXTERN_C lv_indev_t* lv_win32_encoder_device_object = NULL; ^~~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c: In function 'lv_win32_init': D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:249:45: warning: passing argument 2 of 'LoadCursorW' from incompatible pointer type [-Wincompatible-pointer-types] 249 WindowClass.hCursor = LoadCursorW(NULL, IDC_ARROW); ^~~~~
CHAR {aka char }

In file included from d:\stmicroelectronics\stm32cube\mingw\include\windows.h:48, from D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.h:23, from D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:10: d:\stmicroelectronics\stm32cube\mingw\include\winuser.h:3999:51: note: expected 'LPCWSTR' {aka 'const short unsigned int '} but argument is of type 'CHAR ' {aka 'char '} 3999 | WINUSERAPI HCURSOR WINAPI LoadCursorW (HINSTANCE, LPCWSTR); | ^~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:281:19: warning: implicit declaration of function 'lv_win32_get_dpi_for_window' [-Wimplicit-function-declaration] 281 | g_dpi_value = lv_win32_get_dpi_for_window(g_window_handle); | ^~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:319:5: warning: implicit declaration of function 'lv_win32_enable_child_window_dpi_message' [-Wimplicit-function-declaration] 319 | lv_win32_enable_child_window_dpi_message(g_window_handle); | ^~~~~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:321:24: warning: implicit declaration of function 'lv_win32_create_frame_buffer' [-Wimplicit-function-declaration] 321 | HDC hNewBufferDC = lv_win32_create_frame_buffer( | ^~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:321:24: warning: initialization of 'HDC' {aka 'struct HDC__ '} from 'int' makes pointer from integer without a cast [-Wint-conversion] D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c: At top level: D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:375:12: error: conflicting types for 'lv_win32_create_frame_buffer' 375 | static HDC lv_win32_create_frame_buffer( | ^~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:321:24: note: previous implicit declaration of 'lv_win32_create_frame_buffer' was here 321 | HDC hNewBufferDC = lv_win32_create_frame_buffer( | ^~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:501:13: error: static declaration of 'lv_win32_enable_child_window_dpi_message' follows non-static declaration 501 | static BOOL lv_win32_enable_child_window_dpi_message( | ^~~~~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:319:5: note: previous implicit declaration of 'lv_win32_enable_child_window_dpi_message' was here 319 | lv_win32_enable_child_window_dpi_message(g_window_handle); | ^~~~~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:569:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'? 569 | HTOUCHINPUT hTouchInput, | ^~~ | PTOUCHINPUT D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:593:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'? 593 | HTOUCHINPUT hTouchInput) | ^~~ | PTOUCHINPUT D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:614:5: error: unknown type name 'In' 614 | In HWND WindowHandle) | ^~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c: In function 'lv_win32_window_message_callback': D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:898:10: error: 'WM_TOUCH' undeclared (first use in this function); did you mean 'WM_TOUCHUP'? 898 | case WM_TOUCH: | ^~~~ | WM_TOUCHUP D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:898:10: note: each undeclared identifier is reported only once for each function it appears in D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:901:9: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'? 901 | HTOUCHINPUT hTouchInput = (HTOUCHINPUT)(lParam); | ^~~ | PTOUCHINPUT D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:901:36: error: 'HTOUCHINPUT' undeclared (first use in this function); did you mean 'PTOUCHINPUT'? 901 | HTOUCHINPUT hTouchInput = (HTOUCHINPUT)(lParam); | ^~~ | PTOUCHINPUT D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:906:17: warning: implicit declaration of function 'lv_win32_get_touch_input_info' [-Wimplicit-function-declaration] 906 | if (lv_win32_get_touch_input_info( | ^~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:915:31: warning: implicit declaration of function 'TOUCH_COORD_TO_PIXEL' [-Wimplicit-function-declaration] 915 | Point.x = TOUCH_COORD_TO_PIXEL(pInputs[i].x); | ^~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:936:9: warning: implicit declaration of function 'lv_win32_close_touch_input_handle' [-Wimplicit-function-declaration] 936 | lv_win32_close_touch_input_handle(hTouchInput); | ^~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:940:10: error: 'WM_DPICHANGED' undeclared (first use in this function); did you mean 'WM_USERCHANGED'? 940 | case WM_DPICHANGED: | ^~~~~ | WM_USERCHANGED At top level: D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:501:13: warning: 'lv_win32_enable_child_window_dpi_message' defined but not used [-Wunused-function] 501 | static BOOL lv_win32_enable_child_window_dpi_message( | ^~~~~~~~~~~~ D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:375:12: warning: 'lv_win32_create_frame_buffer' defined but not used [-Wunused-function] 375 | static HDC lv_win32_create_frame_buffer( | ^~~~~~~~ Process terminated with status 1 (0 minute(s), 2 second(s))

Process terminated with status 0 (0 minute(s), 2 second(s)) 18 error(s), 14 warning(s) (0 minute(s), 2 second(s))

chanvenjoe commented 2 years ago

Mail have been received, thank you.

samuelwhg commented 2 years ago

I made a mistake and didn't use the required compiler