Hi,
Suppose I have 2 static Libs S1
and S2
which are different versions of the same lib and have the same C (not C++) interface though implementations are different. 2 shared libs D1
and D2
each of which links to S1
or S2
only. Suppose an application A
links with S2
which is the more recent of the static libs and dynamically loads both D1
and D2
with dlopen
. Will D1
just use S1
s functions or is there any way to enforce it to use S2
s functions? Can anything go wrong in this setup?
EDIT: Is making a shared object S
a good way to circumvent this problem as D1
and D2
can both link to S
then?