RE: dlopen() on 10.3 and static initializers: SOLVED
RE: dlopen() on 10.3 and static initializers: SOLVED
- Subject: RE: dlopen() on 10.3 and static initializers: SOLVED
- From: "Peter O'Gorman" <email@hidden>
- Date: Fri, 07 Apr 2006 07:52:48 +0900
On Thu, 2006-04-06 at 15:20 -0700, David Litwin wrote:
> As it happens __attribute__((constructor)) makes the _init() call run in
> 10.4, but does nothing to help 10.3.
>
> One thing that got it working for me was to have all my calls to
> dlopen() be followed by the following:
>
> InitFunc initLoadedLib = (InitFunc) dlsym(dlHandle, "_Z5_initv");
> initLoadedLib();
>
> This, of course, led me to realize that _init() had to be extern "C" for
> the dlcompat code to find it :)
Yes. I'm glad you got all that figured out.
Peter
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________
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