Re: Problem with dlsym
Re: Problem with dlsym
- Subject: Re: Problem with dlsym
- From: "Peter O'Gorman" <email@hidden>
- Date: Fri, 13 May 2005 09:19:51 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter O'Gorman wrote:
|
| As an alternative to Jordan's suggestion, change calls to dlsym to:
| if (NSIsSymbolNameDefined(sym)) dlsym(handle,symbol);
It is amazing how I could forget the underscore here and remember it below.
Above won't work.
| void* my_dlsym(void* module,const char* symbol) {
| ~ char* u_sym=NULL;
| ~ void* address=NULL;
| ~ int retCode= asprintf(&u_sym,"_%s",symbol); // ignoring error, naughty!
Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iQCVAwUBQoPyp7iDAg3OZTLPAQKNPwQAnl3ebS3zQ3VFL7Ruub0X2RQOJikOqqtg
4vcFnolTCfyHQ+2vzGfpxfcKYpthZMA6sQ4LfDJaiu5hMtmsNEEuK8hHTLb6W3kl
kn7Tys+/V9/2Ox1thnvFEGHANxv+0jGg30jEzzvd5SKQADDaxKONJeOmzZhBfW9L
3Km385JGb6Y=
=1oeA
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden