3

dylib をロードする次のコードがあります。

void* lib_handle = dlopen("./newCocoaLib.dylib", RTLD_LOCAL);
if (!lib_handle) {
    exit(EXIT_FAILURE);
}


// Get the Person class from newCocoaLib.dylib.
Class Person_class = NSClassFromString(@"newCocoaLib");
if (!Person_class) {
    exit(EXIT_FAILURE);
}

id personObj = [Person_class new];
//calling the method of newCocoaLib of newCocoaLib.dylib
[personObj displayNameFromNewCocoaLib];//unrecognized selector sent to instance

何が問題なのですか?何か案は?

4

0 に答える 0