1846292 Members
3711 Online
110256 Solutions
New Discussion

Compilation Problem

 
David Tang_1
Advisor

Compilation Problem

Hi all,
I have a problem with the compilation of a program. I get the error msg saying unsatisfied symbols. There seems to be a linkage problem. Anybody can help.

Thanks.
3 REPLIES 3
Andreas Voss
Honored Contributor

Re: Compilation Problem

Hi,

probably you have missed some linker libraries (-lxxx).
Could you please post the compile/link command and the resulting errors ?

Regards
David Tang_1
Advisor

Re: Compilation Problem

After the compilation the error is
unsatisfied symbols
shl_load(code)
shl_unload(code)
shl_findsym(code)
Andreas Voss
Honored Contributor

Re: Compilation Problem

Hi,
here i found a document for you:


C: error - /usr/ccs/bin/ld: Unsatisfied symbols: shl_load, shl_unload
Current Path Home
Score
Document Type EN
Date 1999 Jul 08
Description C: error - /usr/ccs/bin/ld: Unsatisfied symbols: shl_load, shl_unload
Document Id A5642648
Search String

You may provide feedback on this document

View the printer friendly version of this document



--------------------------------------------------------------------------------

Problem Description

When I try to build a static excutable, I have this error:

/usr/ccs/bin/ld: Unsatisfied symbols:
shl_load (code)
shl_unload (code)
shl_findsym (code)

What is causing this problem?

Configuration Info

Operating System - HP-UX
Version - 10.20
Hardware System - HP9000
Series - E35
Application - C compiler

Solution

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.


Regards