DLCLOSE(3) BSD Library Functions Manual DLCLOSE(3)NAME
dlclose -- close a dynamic library or bundle
SYNOPSIS
#include <dlfcn.h>
int
dlclose(void* handle);
DESCRIPTION
dlclose() releases a reference to the dynamic library or bundle referenced by handle. If the reference count drops to 0, the bundle is
removed from the address space, and handle is rendered invalid. Just before removing a dynamic library or bundle in this way, any termina-
tion routines in it are called. handle is the value returned by a previous call to dlopen.
Prior to Mac OS X 10.5, only bundles could be unloaded. Starting in Mac OS X 10.5, dynamic libraries may also be unloaded. There are a cou-
ple of cases in which a dynamic library will never be unloaded: 1) the main executable links against it, 2) An API that does not supoort
unloading (e.g. NSAddImage()) was used to load it or some other dynnamic library that depends on it, 3) the dynamic library is in dyld's
shared cache.
RETURN VALUES
If dlclose() is successful, it returns a value of 0. Otherwise it returns -1, and sets an error string that can be retrived with dlerror().
SEE ALSO dlopen(3)dlsym(3)dlerror(3)dyld(3)ld(1)cc(1)
Nov 6, 2006
Check Out this Related Man Page
DLCLOSE(3) BSD Library Functions Manual DLCLOSE(3)NAME
dlclose -- close a dynamic library or bundle
SYNOPSIS
#include <dlfcn.h>
int
dlclose(void* handle);
DESCRIPTION
dlclose() releases a reference to the dynamic library or bundle referenced by handle. If the reference count drops to 0, the bundle is
removed from the address space, and handle is rendered invalid. Just before removing a dynamic library or bundle in this way, any termina-
tion routines in it are called. handle is the value returned by a previous call to dlopen.
Prior to Mac OS X 10.5, only bundles could be unloaded. Starting in Mac OS X 10.5, dynamic libraries may also be unloaded. There are a cou-
ple of cases in which a dynamic library will never be unloaded: 1) the main executable links against it, 2) An API that does not supoort
unloading (e.g. NSAddImage()) was used to load it or some other dynnamic library that depends on it, 3) the dynamic library is in dyld's
shared cache.
RETURN VALUES
If dlclose() is successful, it returns a value of 0. Otherwise it returns -1, and sets an error string that can be retrived with dlerror().
SEE ALSO dlopen(3)dlsym(3)dlerror(3)dyld(3)ld(1)cc(1)
Nov 6, 2006
I load some dynamic libraries from main module (with dlopen). These libraries use 1 function from main module, therefore in Makefile I must use
gcc -g -Wl,--export-dynamic,-rpath,./lib -o not not.o db.o -ldl -ldb -lpcap
Note option --export-dynamic that is passed to the ELF linker.
The... (4 Replies)
Hi
I have a 64bit C++ dynamic component built using Sun Forte compiler(CC) on one server.
I am opening this shared component using dlopen and checking if a particular function is defined or not. After that, when I am closing the component using dlclose, the program is crashing.
The... (3 Replies)
Hi,
I wonder how can we override the dynamic library loaded by ld on start up.(dynamic linked application). so that linker uses the new library to find symbols.
Is it possible to do.
Cheers. (4 Replies)
Hi everyone:
I'm developing a dynamic library for notifications, this library is used for a daemon that i've programmed, when something goes wrong the library should send an email to an administrator, but since sending an email is a non-vital process then it can fail (it should work as an... (4 Replies)
Hi,
I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum.
In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Hello,
One of our Customer is getting Coredump when our application is trying to load a library(one of our products library) using dlopen() on AIX 6.1.
Our application and our shared library are built on AIX 5.3 machine using xlC compiler.
we have tried executing the same application on... (2 Replies)
if I could compile the same source file as shared/static/dynamic what are the advantages/ disadv of each.
PS:by dynamic i am asking about usage of "dlopen". How is it particularly diff from shared libs (2 Replies)
Hi all,
Need help to seek string with dynamic value that always change?
Example string
JOB_WORK_STAFF_MARY_JANE_20111013_000000001.DAT
"JOB_WORK_STAFF_" and "_20111013_000000001.DAT" is static length.
How do I select the "MARY_JANE" in the middle of the string.
Please advice.
... (5 Replies)
I have scouted around the last few years and always see that for a individual person to create a dynamic development environment in Mac takes a PHD or something close.
Or there are a lot of miss leading info.
I would rather work with raw code compared to a wysiwyg editor of any flavor.
At this... (5 Replies)
Hi all, my first post here. I'm trying to load hypermail on my Mac (Tiger 10.4.11). It seemed to install just fine, but when I run the test build I get this error:
dyld: Library not loaded: /usr/local/lib/libpcre.0.dylib
Referenced from: /Users/sstark/Desktop/hypermail/tests/../src/hypermail... (4 Replies)
Hi all,
I was wondering ( yes it is a noob question :) ), i buy a domain (from domain.com) but i have dynamic public ip address and i was wondering if there is a way to automatically update my dynamic public ip address to my domain with BIND.
For example now i have some ip 22.22.22.22... (4 Replies)
First of I would just like to state that I am not looking for you guys to just do my work for me, I do want to learn and actually understand everything that is happening.
Hey all, I am having trouble on this. What I need to do is... Write an executable C file that will take a text file (not a... (8 Replies)
I do have a big CA bundle certificate file and each time if i get request to add new certificate to the existing bundle i need to make sure it is not present already. How i can validate the duplicates.
The alignment of the certificate within the bundle seems to be different.
Example:
Cert 1... (7 Replies)
Hello,
i want built a log analyzer for nginx. Okay and i use it as training for the shell tools. The most what i want i could relize. But i has trouble with dynamic things. I have the IP address extracted and has set the geo localtion for the ip.
I would like to count the countries. With... (3 Replies)