1825766 Members
2083 Online
109687 Solutions
New Discussion

Re: Linking Fatal Error

 
SOLVED
Go to solution
Skandh
Occasional Contributor

Linking Fatal Error

I am creating shared library, say A.so, which links to other library, say B.so.
B.so depends on,say, C.so.

A.so <- B.so <- C.so

On my system B.so present but C.so is not present.

So while linking I am getting
Fatal Error : ld: Can't find dependent library C.so

Linkline:

/usr/ccs/bin/ld -b +nosymb _ZTS* -o A.so +pi 16M +pd 16M +s -B immediate -Llibs/ a.o -lB

As per my understanding there should not be any linking error.
Please help me to circumvent linking error.

Thanks
1 REPLY 1
Dennis Handly
Acclaimed Contributor
Solution

Re: Linking Fatal Error

>On my system B.so present but C.so is not present.

(You need to have the turtles all the way down. :-)

>As per my understanding there should not be any linking error.

Where does it say this?

You'll need to create an "empty" shlib or possibly create a symlink to libc.so.1.

 

Note: You should NOT be using ld directly to create aC++ shlibs, use "aCC -b".