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

From: <dwp_at_md1tech.co.uk>
Date: Thu, 20 Apr 23 12:19:42 +0000

Hello,

My objective is to develop an RCC worker that can utilise an external library which is not inherently integrated into openCPI. With standard C++, I would achieve this by simply adding the required include path and library to the makefile.

As an example, I attempted to construct a worker that could host a CivetWeb server. The first issue I ran into was getting the worker to build, giving the error:

In file included from **source.cc:14**:

**web.h:4:10:** **fatal error:** CivetServer.h: No such file or directory

    4 | #include **“CivetServer.h”**

      |          **^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~**

compilation terminated.

To determine if this was the sole problem, as a temporary solution I created a folder named 'civetweb' within 'source.rcc' containing the civetweb source code. Allowing it to be accessed directly. The component then compiled successfully.

I created an application that solely comprised of this worker, but when trying to run the application I got the following error:

app failed: Could not open RCC worker file /…/local.examples.source.rcc.0.ubuntu22_04.so: error loading "/…/local.examples.source.rcc.0.ubuntu22_04.so": /…/local.examples.source.rcc.0.ubuntu22_04.so: undefined symbol: _ZN12CivetHandler9handleGetEP11CivetServerP13mg_connectionPi

make: \*\*\* \[/…/opencpi/cdk/include/application.mk:70: run\] Error 1

Has anyone successfully used an external C++ library in a worker in this way? Any guidance would be really appreciated.

Thanks in advance,

Dan






Received on Thu Apr 20 2023 - 12:19:42 CDT

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