How to add a custom shared library .so in application on Torizon?

I’m trying to implement a application that part of the functions used in the code, comes from a 3rd party. That is sharing a .so.

However, how do i add this .so as i compile and build the application using the Torizon IDE v2?

Hi, Caio.

As you are trying to use functions from a .so file in your code, firstly you need to install these libraries inside the container, to do this you can add the package to torizonPackages.json file. By doing this, the package will be automatically added to your Dockerfile and Dockerfile.debug. For more information, please refer to this article.

After installing the libraries, if you are using C or C++, you also need to link your code with the library, in order to do this you can modify the LDFLAGS within the Makefile. As an example, please take a look into our examples here.

Best regards.