Re: info.plist with DYLD_LIBRARY_PATH = ~/test
Re: info.plist with DYLD_LIBRARY_PATH = ~/test
- Subject: Re: info.plist with DYLD_LIBRARY_PATH = ~/test
- From: Kurt Sutter <email@hidden>
- Date: Sun, 3 Oct 2010 06:06:44 +0200
On 3. Oct 2010, at 3:54, Kyle Sluder wrote:
> On Oct 2, 2010, at 3:10 AM, Kurt Sutter <email@hidden> wrote:
>
>> Sorry to be obtuse, but it may be that I am overlooking something. Presently, we have calls such as
>>
>> n = PyNumber_Float(obj)
>> s = PyString_AsString(obj)
>>
>> I understand that I would need to generate #defines for all those names, such as PyNumber_Float to map them to some table. I would have to initialize that table in a big for loop that goes through another table containing the name of each function (e.g. "PyNumber_Float". The loop then looks each name up with dlsym and initializes the table.
>>
>> Or can this be done more elegantly?
>
> 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.
> --Kyle Sluder
I have already tried that. Alas, it does not seem to work.
k
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden