HP-UX Reference (11i v2 03/08) - 3 Library Functions A-M (vol 6)

d
dlopen(3C) dlopen(3C)
RETURN VALUE
If file cannot be found, cannot be opened for reading, is not a shared object, or if an error occurs during
the process of loading file or relocating its symbolic references,
dlopen returns NULL. More detailed
diagnostic information is available through
dlerror.
WARNINGS
The environment variable
LD_LIBRARY_PATH
and SHLIB_PATH should contain a colon-separated list
of directories, in the same format as the
PATH variable (see sh(1)). LD_LIBRARY_PATH
and
SHLIB_PATH will be ignored if the process real user id is different from its effective user id or its real
group id is different from its effective group id (see exec(2)).
With the
+compat option specified, LD_LIBRARY_PATH
and +b embedded path will be ignored while
searching for dependent libraries.
Use caution when building shared libraries with external library dependencies. Any library that contains
Thread Local Storage (TLS) and uses static TLS model should not be used as a dependency. See "Thread
Local Storage" in dld.so(5) for more information. If a dependent library contains TLS, was built with
static TLS model and it is not loaded during program startup (that is, not linked against the executable),
the dynamic loader fails to perform the operation. You can use
+tls=dynamic compiler option to re-
compile the library to avoid errors.
SEE ALSO
cc(1), ld(1), sh(1), exec(2), dlclose(3C), dlerror(3C), dlsym(3C).
Texts and Tutorials
HP-UX Linker and Libraries Online User Guide
(See the
+help option)
HP-UX Linker and Libraries User’s Guide
(See manuals(5) for ordering information)
HP-UX 11i Version 2: August 2003 3 Hewlett-Packard Company Section 3205