On Jan 4, 2010, at 6:13 PM, Graham Cox wrote:

> 
> On 05/01/2010, at 11:03 AM, David Alter wrote:
> 
>> I can open a library and lookup a function by name using dlsym. These
>> constants are EXTERN. It seams there should be away to look these up as
>> well.
> 
> Functions are not the same, because a function's name is a necessary part of 
> the runtime. A constant's name is just a convenience for the programmer and 
> doesn't make it into the binary.
> 
> There is no built-in standard way to do this - you're on your own.


CFBundle has routines for looking up both functions and data by name.  It does 
require you figure out what framework the symbol comes from (and then get the 
corresponding CFBundle), but it is doable.




Glenn Andreas                      gandr...@gandreas.com 
The most merciful thing in the world ... is the inability of the human mind to 
correlate all its contents - HPL

_______________________________________________

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

Reply via email to