Kenwood HP 9000 Personal Computer User Manual


 
Chapter 5 175
Creating and Using Libraries
Caution When Mixing Shared and Archive Libraries
Figure 5-24
Summary of Mixing Shared and Archive
Libraries
Applications that depend on shared libraries should not use archive
libraries to satisfy symbol imports in a shared library. This suggests that
only a shared version of libc should be used in applications using
shared libraries. If an archive version of a dependent library must be
used, all of its definitions should be explicitly exported with the -E or +e
options to the linker to avoid multiple definitions.
Providers of shared libraries should make every effort to prevent these
kinds of problems. In particular, if a shared library provider allows
unsatisfied symbols to be satisfied by an archive version of libc, the
application that uses the library may fail if the shared library is later
updated and any new libc dependencies are introduced. New
dependencies in shared libraries can be satisfied by maintaining
accurate dependency lists. However, this can lead to multiple
occurrences of the same definition in an application if the definitions are
not explicitly exported.