I have 2 static libraries,
libalgha.a
with 2 functions: func1()
and func2()
and
libbeta.a
with 2 functions: func3()
and func4()
I have 1 executable (mytest
) linked with these 2 libs. The executable calls only func1()
and func3()
. So as I understand the linker will put only the symbol of these 2 functions into the executable.
The executable is loading with dlopen()
in runtime a shared library (libgamma.so
) and this shared library uses the function func2()
from libalgha.a
. When running mytest
I get the error:
symbol func2: referenced symbol not found
I can't include libalgha.a
inside libgamma.so
because of a Solaris 32/64 bits issue.
So how can I link mytest
with all symbols of libalgha.a
?