I have an executable project which uses a shared library, that includes a static library. Then from the executable, I try to load another shared library with dlopen
. That library is found but it cannot find symbols from static library.
Here is the structure:
-- SHARED LIB 1
-- (compiled with) Static Lib 1
-- EXECUTABLE
-- SHARED LIB 1
-- dlopen SHARED LIB 2 XX ERROR: SHARED LIB 2 cannot find symbols of Static Lib 1
Both SHARED LIB 1
and SHARED LIB 2
are linked from /usr/lib
.
It seems that I miss some flags.
How could I solve this issue?
extern "C"
(or you have to use their mangled names). Are you doing that? – Telescopy