Lvgl build with vector graphic support

Description

In LVGL 9 I wanted to try out the new vector graphic support. In the configuration I have leave everything at default except:
#define LV_USE_VECTOR_GRAPHIC 1
#define LV_USE_THORVG_INTERNAL 1

After this setup when building the project I get multiple errors:
undefined reference to `_imp__tvg_engine_init’

undefined reference to `_imp__tvg_engine_term’

The same errors goes on for every function.
Is there any documentation how to build this correctly or what could be wrong?

What MCU/Processor/Board and compiler are you using?

Windows, building with GCC

Danijel

1 Like

I would try compiling under WSL. Windows can be a fickle animal even when using MINGW etal.

I think the problem is something else. I have now tried to build the project on a ubuntu machine and I receive just the same errors.

Any other idea?

Hi,

I’m currently using Ubuntu and compiled the latest master with no errors (with lv_port_pc_eclipse). I’ve also searched for the symbols as tvg_engine_init and tvg_engine_term and they’re in tvgCapi.cpp, are you also compiling that file?

Any other clue on the environment you’re using? An specific IDE?

I have tried to build on windows with gcc and also an esp32 project inside espressif-ide, both failed. Then I tried also on a virtual ubuntu to build the esp32 project but failed as well. I get always the same error.

So for me now currently its mostly imporant that I will be also able to build the code for esp32.

I have checked the thorvg_capi.h where the dunction is declared and there is a macro TVG_API which I quiet dont underastant what makes and if this is maybe the problem.

Is there something else apart of the LV_USE_VECTOR_GRAPHIC and LV_USE_THORVG_INTERNAL to enable?

I think the issue is that ThorVG is written in C++ and the build system you are using only include plain C files. I am sure this is the case for ESP32 as the esp.cmake file lacks a rule to include them (I opened a pull request Added *.cpp glob in ESP configuration by Maldus512 · Pull Request #5761 · lvgl/lvgl · GitHub), probably it is causing your errors even on Windows or Linux.

1 Like