I keep getting the following error trying to compile the weather station sketch in the version 1.4 of your pdf book. I am using the CYD module. I am using Arduino IDE 2.3.3
The line it complains about is line 208
Compilation error
invalid use of incomplete type ‘lvl_draw_task_t'{aka ‘struct lv_draw_t}
I am using all the correct versions of the libraries.
Any idea why this is happening?
Module 6 HTTP GET Request: Weather API.
I have tried the version downloaded with the pdf book and also from the url in the book.
It used to work when I first tried it earlier in the year.
I did have to remove and replace all the libraries after I accidently let the IDE update the libraries. They are back to the suggested versions. I have also ensured the correct User.setup.h and lv_conf.h files are in the right places. Not sure where to go now.
It’s a compilation error. It doesn’t make any sense.
Compilation error invalid use of incomplete type ‘lv_draw_task_t'{aka ‘struct lv_draw_task_t’}
It's at line number 208 in the program
Hi.
Can you tell me the version of the LVGL library you have installed? Just to make sure we’re testing the same thing.
Additionally, can you also check the ESP32 boards version (Tools > Boards > Boards Manager > Search for ESP32 and check the version).
Then, I’ll try to compile it on my Arduino IDE with the exact same versions as yours.
Regards,
Sara
Hi Sara,
Thanks for your perseverence.
My setup is as follows.
I’m using a windows 10 laptop with the following libraries installed.
esp32 board version 3.04
LVGL version 9.22
TFT_eSPI version 2.5.34
XXPT2046Touchscreen version 1.4
IDE version 2.3.3
Gary
Hi again.
I just tested everything and it is working as expected.
So, I’m not sure what might be wrong.
What city are you inserting in the location variable? Can you try it with “Oporto”? Just to check if it might be an issue with the city.
If you continue with issues, do the following…
1. You may update the TFT_esPI library. I’m using the latest version without any problems. After updating, make sure to check the User_Setup file. Check if it is in the right place, if not, put it there again. Use the one provided in the last version of the eBook (version 1.4).
2. I would suggest that you uninstall the LVGL library (delete any LVGL folders from the Arduino IDE libraries folder), and then install it again following the exact procedure on the eBook version 1.4.
Maybe something went wrong during the library updates or something like that.
After doing this, let me know your results.
Regards,
Sara
Hi Sara,
I tried removing lvgl and then reinstalling ver 9.20
I’m afraid I still get the same compilation errors.
I wonder if it’s anything to do with the IDE version. I’m using version 2.33. I have found some programs from the book work and others don’t. It’s really frustrating. I cannot understand what the errors mean they all refer to “invalid use of incomplete type “. In all the programs that fail the problem is a reference to a struct ie.
208 lv_draw_ dsc_base_t ………draw_task-> draw_dsc;
Not sure why but it is very annoying.
Hi.
Did you also check the TFT_eSPI library?
I’m really not sure what might be wrong. Everything is working fine with my setup.
I don’t think it is related to the Arduino IDE version.
Regards,
Sara
I found some users with similar problems.
Here they provide some solutions: https://github.com/lvgl/lvgl/issues/6812
I’m not sure if this works as I cannot reproduce this problem.
Regards,
Sara
Hi Sara, thanks for all your help. I had a look at the lv_conf.h file and found I had installed the 9.00 version and not the 9.20 version in the libraries folder. On replacing the correct version the sketch now compiles and runs correctly. Thanks again for helping me out.
Cheers Gary