Linux dlopen cannot find static library symbol

I have an executable project that uses a shared library that includes a static library. Then from the executable I am trying to load another shared library with dlopen. This library was found, but it cannot find characters from the 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 1and SHARED LIB 2are associated with /usr/lib.

It seems like I'm missing a few flags.

How can I solve this problem?

0
source share
1 answer

What flags are used to create SHARED LIB 1? AFAIK -fvisibility does not affect static libraries.

, --exclude-libs , "Static Lib 1" .

, : gcc -fvisibility ?

0

All Articles