Close a shared object
#include <dlfcn.h> int dlclose( void *handle );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The dlclose() function disassociates a shared object opened by dlopen() from the calling process. An object's symbols are no longer available after it's been closed with dlclose(). All objects loaded as a result of the closed objects dependencies are also closed.
The handle argument is the value returned by a previous call to dlopen().
|The dlclose() function is available only to dynamically linked processes.|
0 for success, or a nonzero value if an error occurs.
If an error occurs, more detailed diagnostic information is available from dlerror().
POSIX 1003.1 XSI
An object won't be removed from the address space until all references to that object (via dlopen() or dependencies from other objects) have been closed.
Referencing a symbol in a closed object can cause undefined behavior.
dladdr(), dlerror(), dlopen(), dlsym()