1833677 Members
4273 Online
110062 Solutions
New Discussion

Re: library problem

 
shilpa_1
Occasional Contributor

library problem

Hi,

While compiling my code on HP 11.x system, the compiler by default links takes dynamic linking. To statically link to libraries I added the following as a flag to cc:
-Wl,-a,archive.
However I get the foll. linker errors:

/usr/ccs/bin/ld: Unsatisfied symbols:
shl_findsym (code)
shl_load (code)
shl_unload (code)
On a verbode mode I find that the error comes from libc.a

Why should libc.a call the above functions ?
How do I solve this error ?

Regards.
2 REPLIES 2
Animesh Chakraborty
Honored Contributor

Re: library problem

Hi,
This problem occurs because some functions use Dynamic Name Service
Switch (DNSS), which has dependency on libdld.

For a list of commands that use DNSS, see 'man 4 nsswitch.conf'.

To solve the problem, add '-Wl,-E -Wl,+n -l:libdld.sl' when compiling.

The excutable contains all archived libraries but libdld.sl. Unless
you change these function, an application that uses these interfaces
(DNSS) cannot be fully archive bound.


Best of luck
Animesh

Did you take a backup?
Animesh Chakraborty
Honored Contributor

Re: library problem