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.

-dave


On Mon, Jan 4, 2010 at 3:39 PM, Scott Ribe <scott_r...@killerbytes.com>wrote:

> > What if I'm getting a string passed in that is the name of the constant
> and
> > I want to return the constants string value. Is there a way to do that?
>
> This is C, and just as with variables, the names are not there at runtime.
> If you really need to do this, you'll have to build your own lookup table,
> possibly using some macro magic to avoid having to type the name twice for
> each entry.
>
> --
> Scott Ribe
> scott_r...@killerbytes.com
> http://www.killerbytes.com/
> (303) 722-0567 voice
>
>
>
_______________________________________________

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