Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: dlopen() on 10.3 and static initializers: SOLVED



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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >RE: dlopen() on 10.3 and static initializers: SOLVED (From: "David Litwin" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.