On Oct 2, 2010, at 6:54 PM, Kyle Sluder wrote: > Maybe weak linking can help here. If you weak link the Python library and > call dlopen early on in your program's lifetime with the appropriate path, I > think dyld will populate all the weak linked functions it finds.
No, weak linking doesn't do that. You want deferred binding: if the symbol you want is not present at load time but appears later, resolve to that one at that time. dlopen+dlsym is the only way to get that on Mac OS. Normal linking is required and not deferred: if the symbol you want is not present at load time, your process halts. Weak linking is optional, but still not deferred: if the symbol you want is not present at load time, then your references resolve to NULL. You don't get a chance to try again later. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com