Re: Query regarding dynamic library
Re: Query regarding dynamic library
- Subject: Re: Query regarding dynamic library
- From: Alastair Houghton <email@hidden>
- Date: Mon, 10 Dec 2007 15:39:49 +0000
On 10 Dec 2007, at 15:27, parag vibhute wrote:
Thanks for reply.
From ur writeup, I understood that in order to load library at
runtime, dynamic loader needs to get address of function. With
dlopen, we can only get address of C function. Now in order to get
address of C++ class member function at runtime, only way is to
access its address through virtual table. For that, we require to
declare C++ class member public function as virtual. And you are
right, it is only required when we try to use dynamic library at run
time. If we load dynamic library at launch time of application, then
linker keeps reference to non-virtual C++ class member function in
executable bcoz of which we successfully run of application which is
dependant on dynamic library. I hope I am right, am I?
Essentially, yes.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden