Re: Open Framework library : by using the name
Re: Open Framework library : by using the name
- Subject: Re: Open Framework library : by using the name
- From: Christiaan Hofman <email@hidden>
- Date: Wed, 17 Nov 2010 12:17:54 +0100
That's not my question. My question is why you don't just link, i.e. why are you calling dlopen yourself?
Anyway, AFAIK you should always use a full path here. dlopen looks for relative paths using the library search paths, but those almost certainly won't point to any place inside frameworks. It should not mater much, because these standard places to install system frameworks (certainly such a basic one) are not gonna change: if they ever do, you can be sure that every single app you would now have on your computer won't work (how likely you think that will be?).
Christiaan On Nov 17, 2010, at 12:07, trilok nuwal wrote: I just want to avoid the absolute path as if installed path change in the later release or on some other MAC platform, still code doesn't break.
On Wed, Nov 17, 2010 at 3:39 PM, Christiaan Hofman <email@hidden> wrote:
On Nov 17, 2010, at 8:42, trilok nuwal wrote:
I am opening framework library "CoreServices" as below.
dlopen("/System/Library/Frameworks/CoreServices.framework/CoreServices", RTLD_GLOBAL | RTLD_NOW);
Here I am giving full path of library, Is it any API I can use to get the full path just by giving name "CoreServices" so that I can make it more secure and can avoid any problem in the future as far as library path is concerned.
Or do we have any other api to so this in better way.
Thanks -Trilok
Well, you can simply link to the library? Why don't you?
Christiaan
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden