From: Pit Linnartz <linnartz@software-ag.de>
Subject: Re: dlopen
Date: 1999/09/16 [thread overview]
Message-ID: <37E11010.B962A397@software-ag.de> (raw)
In-Reply-To: 7rq8nb$tfk$1@nnrp1.deja.com
"Srinivasa T.N." wrote:
basicly
void *dlptr;
void main(int argc, char *argv[])
{
void (*fct)();
if ( (dlptr = dlopen("file.so", RTLD_LAZY)) != NULL ){
if ((fct = dlsym(dlptr, "your_function")) == 0){
printf("main: dlsym failed %s\n", dlerror());
}else{
(*fct)();
dlclose(dlptr);
}
}else
printf("main: ldopen %s failed %s\n",filename, dlerror());
}
Pit
> Hi,
> Can anyone tell me how to use the functions related to dynamic
> libraries, like dlopen, dlclose, etc.. If an example is given about how
> to use them, it will be of much help..
>
> With Regards,
> Seenu.
>
> --
> Research Engineer, C-DOT, 9th Floor, Akbar Bhawan, Chanakyapuri,
> New Delhi - 110 021. Ph: 467 7525 Extn. 327
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
prev parent reply other threads:[~1999-09-16 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-16 4:00 dlopen Srinivasa T.N.
1999-09-16 4:00 ` Pit Linnartz [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox