Re: Dynamic loading of System Frameworks???
Re: Dynamic loading of System Frameworks???
- Subject: Re: Dynamic loading of System Frameworks???
- From: Stéphane Sudre <email@hidden>
- Date: Fri, 27 Jun 2003 21:41:43 +0200
On vendredi, juin 27, 2003, at 08:51 PM, Huyler, Christopher M wrote:
Ok, thanks for everyone's help with my Gestalt issues. I finally
tracked the problem down to the loader. Although the symbols for all
the functions were defined, the libraries in the CoreServices
framework had not fully been initialized. This was because I was
calling Gestalt inside a constructor.
Anyway, rather than let the loader decide when to initialize the
libraries, I decided to load it myself. (See test program below)
However I have one problem. I have to specifiy the full path of the
library. Does anyone know if this will be a problem as Apple upgrades
their libraries? Could the library be located in a different place on
a different computer? Is there a better way to do this? I'm open to
suggestions.
I would avoid doing this for the simple reason that you can't be sure
that the calls you need will always be in this particular Framework.
Having seen the Internet Config APIs moving from one Framework to
another one, I can say surprises can always happen.
At least, you could make the beginning of the path relative using the
API within /usr/include/NSSystemDirectories.h
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.