I have the following code to download dylib:
void* lib_handle = dlopen("./newCocoaLib.dylib", RTLD_LOCAL);
if (!lib_handle) {
exit(EXIT_FAILURE);
}
Class Person_class = NSClassFromString(@"newCocoaLib");
if (!Person_class) {
exit(EXIT_FAILURE);
}
id personObj = [Person_class new];
[personObj displayNameFromNewCocoaLib];
What could be the problem? Any ideas?
Akbar source
share