[Discuss OpenCPI] Re: Requesting help with using external C++ libraries

From: Dominic Walters <waltersdom_at_googlemail.com>
Date: Mon, 19 Jun 23 19:19:47 +0100

Hi,

You have two main options:

* Use `RccCustomLibs+=/path/to/compiled/library` in a Makefile
  * Mentioned on Pg 69 of
https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_RCC_Development_Guide.pdf
  * If you need to pick a different library depending on the RCC Platform,
you can do `RccCustomLibs_centos7+=/path/to/compiled/centos7/library`
  * This variable can be a list of multiple libraries.
  * Your Makefile would minimally look like this:

   ```make
   RccCustomLibs_centos7+=/path/to/compiled/centos7/library
   include $(OCPI_CDK_DIR)/include/worker.mk
   ```

* `(dynamic/static)prereqlibs`
  * Mentioned in Section 3.1.8/9 of
https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_RCC_Development_Guide.pdf
  * If you use this, you need to build your library in the `prerequisites`
folder of your project or the OpenCPI repo itself.
  * See `liquid` in `ocpi.assets` for an example:
https://gitlab.com/opencpi/opencpi/-/blob/develop/projects/assets/prerequisites/liquid/install-liquid.sh
  * Warning: This is more complicated and error-prone, but more robust when
porting to new RCC Platforms.

I'd do the former for a quick solution to get something working but look to
move to the latter in the long term.

Cheers,
D. Walters

On Mon, Jun 19, 2023 at 3:43 PM <dwp_at_md1tech.co.uk> wrote:

> Hi Dom,
>
> Is there a way to specify multiple shared objects that need to be linked
> to?
>
> I couldn’t see anything mentioned in the RCC dev guide.
>
> Many thanks,
> Dan
> _______________________________________________
> discuss mailing list -- discuss_at_lists.opencpi.org
> To unsubscribe send an email to discuss-leave_at_lists.opencpi.org
>






Received on Mon Jun 19 2023 - 18:19:47 CDT

This archive was generated by hypermail 2.3.0 : Fri Jun 05 2026 - 08:45:25 CDT