How to use lv_lottie.h in cpp

Hi everyone. I already read all of the docs about lottie animations. They say rlottie is outdated on LVGL 9. so i tried to use lv_lottie.h instead but i cant figure out how to import it to our projects. Can anyone help please?

My platformio.ini file:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_extra_dirs = 
    ~/Documents/Arduino/libraries
    ~/Documents/Arduino/libraries/src/widgets/lottie
lib_deps =
    ArduinoJson

How should i edit it and how to import it to out cpp file? I tried:

#include <lottie.h>

and some more combinations but none of them are working.

Thanks!

You need to enable the required features and make sure ThorVG builds correctly with a newer C++ standard.

Make the following changes in your build configuration:

  • Enable the Lottie and vector-related flags:
build_flags =
    -DLV_USE_LOTTIE=1
    -DLV_USE_THORVG_INTERNAL=1
    -DLV_USE_VECTOR_GRAPHIC=1
    -DLV_USE_MATRIX=1
    -DLV_USE_FLOAT=1
    -std=gnu++17
  • Remove the default C++11 flag (ThorVG requires a newer standard):
build_unflags =
    -std=gnu++11