iPhone - isKindOfClass generates a linker error
I have a class defined like this :
@interface ServerCall : NSObject {
// vars
}
// properties
// functions (init)
@end
and
@interface ServerNotification : ServerCall {
// just vars
}
@end
I have a call in another class :
if ([call isKindOfClass:[ServerNotification class]])
// do things
When building I have this error :
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ServerNotification", referenced from:
objc-class-ref in ServerCommunication.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
"_OBJC_CLASS_$_ServerNotification", referenced from:
objc-class-ref in ServerCommunication.o
ld: symbol(s) not found for architecture i386
collect2: ld 开发者_JAVA技巧returned 1 exit status
I also have in build settings "Symbols hidden by default" = NO
What did I miss ?
The linker doesn't find implementations for your ServerNotification
class. Do you have the matching implementation file added to your target?
精彩评论