recursive linking to shared object files

S

sirchia.r

Hi all,

I'm not very much of a C expert, so I hope one of you is willing to
help me out.

What I'm trying to do is create a shared object library SO1, to which
an executable E is already linked. The problem here is that SO1 itself
links to another shared object library SO2. Result is that E is not
linked to SO2 and I get the problem of undefined symbols at runtime...

The problem is that there is no static library available of SO2, and I
cannot generate E to make it also link to SO2, next to SO1.

Is it at all possible to make this construction work, considering that
the only thing I can re-compile/re-link is SO1? Can I somehow combine
SO1 and SO2? Can I make E link with SO2 with just access to the
executable? Any other suggestions?

If anyone is willing to help me, I greatly appreciate it!

Riccardo Sirchia
 
W

Walter Roberson

What I'm trying to do is create a shared object library SO1, to which
an executable E is already linked. The problem here is that SO1 itself
links to another shared object library SO2. Result is that E is not
linked to SO2 and I get the problem of undefined symbols at runtime...

What you describe is not an uncommon problem. Unfortunately, the
C standards do not know anything about shared libraries or about
how linking is done or about executables as such or what they should
look like internally. Your problem is thus specific to the tool set
you are using on your operating system, and has no general answer.
On some systems you can fix the problem and on others you cannot.
You will need to consult your system documentation or a newsgroup
that deals with development for your particular operating system.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top