How to import lvgl library to project folder

Hi everyone,

i am trying to add the lvgl lib to the project folder (lib) of my platformio esp-idf framework I finding that the lvgl.h still not detect am I done anything wrong?

1 Like


Have you added lv_conf.h?

See the documentation: Quick overview — LVGL documentation

Copy lvgl/lv_conf_template.h as lv_conf.h next to the lvgl folder, change the first #if 0 to 1 to enable the file's content and set the LV_COLOR_DEPTH defines.

Hi Tinus,

thank for reply, i have added to the platoformio lib folder as shown below image:

I am not sure am i doing it the right way please give me further guidance


You need to rename lv_conf_template.h to lv_conf.h and change some of the defines inside of that file as stated in the documenation I linked above. Could also be necessary to move that lv_conf.h file one more directory here (outside of LIB).

Hi Tinus,

You mean instead of storing the lv_conf.h at the lib folder, I am also able to place another folder like the src folder:

Anywhere file I store as long as it must have a c file and header then everything will be fine?

I think in your case the file lv_conf_template needs to be in the lib folder after all. But you need to rename it to lv_conf.h.

So this :

was correct, all you need to do is change the name of the lv_conf_template.h file to lv_conf.h.

Hi Tinus,

okay noted.
Should I make some changes to the cmake file and plaftformio ini file to the library if needed please advise.

Thank you.

Good day,

I do not think you need to edit those files, and if you would I am afraid I can’t help you. Have you tried compiling? I believe it should work if you have properly named lv_conf.h and edited its content as stated in the documentation.

Hi Tinus,

Still fail to include the LVGL library i am not sure what folder is used to store the external library.