Chapter 6 199
Shared Library Management Routines
Shared Library Header Files
Shared Library Header Files
The shl_load family of shared library management routines use some
special data types (structures) and constants defined in the C-language
header file /usr/include/dl.h. When using these functions from C
programs, be sure to include dl.h:
#include <dl.h>
If you are using HP C++, also include /opt/CC/include/CC/cxxdl.h.
Similarly, if you are using the dlopen family of routines, include
/usr/include/dlfcn.h.
#include <dlfnc.h>
If an error occurs when calling shared library management routines, the
system error variable errno is set to an appropriate error value.
Constants are defined for these error values in /usr/include/errno.h
(see errno(2)). Thus, if a program checks for these error values, it must
include errno.h:
#include <errno.h>
Throughout this section, all examples are given in C. To learn how to call
these routines from C++, FORTRAN, or Pascal, refer to the
inter-language calling conventions described in the compiler
documentation.