1753827 Members
8525 Online
108805 Solutions
New Discussion

Re: unresolved symbols

 
Alfred P. Bartholomai_1
Occasional Contributor

unresolved symbols

We are using aCC on an Itanium 11.23 system.

When we link with a number of OUR archive
libraries = no unresolved symbols.

Now, when link with same libraries, only
this time they are shared libaries. We
get a few unresolved symbols. These symbols
are references to our functions. Is has
nothing to do with system functions.

We can't figure out why there is this difference between using ONLY archive libraries
or ONLY shared libraries.

Any comments or suggestions would be
great.

Thank you.
Fred Bartholomai
1 REPLY 1
Stephen Keane
Honored Contributor

Re: unresolved symbols

When you link with an archive library, all the addresses are resolved at link time. When you link with a shared library only data addresses are resolved at link time, library subroutines are linked at run time.

In 32-bit mode the dynamic loader is responsible for locating those shared libraries needed by an executable at run-time. The dynamic loader uses the attributes of the executable to help it determine where those shared libraries are located. The full path name may be used, or the environment variable SHLIB_PATH may be used (see chatr for more details).

It is possible that the dynamic loader is not loading the shared libraries you think it is loading and hence can't find certain symbols, or that there is another library with the same name, but earlier on its path. Without more details of your problem it is difficult to be more specific.