Reputation: 11
I've created a class using XCode3.2.1 and I want to make it inherit from NSViewController (or any other AppKit entity) .
#import < Cocoa/Cocoa.h>
@interface myCustomView : NSViewController {}
@end
I've linked in the Cocoa libraries, but I get the error that it can't find the class header file
Undefined symbols: "_OBJC_CLASS_$_NSViewController", referenced from:
_OBJC_CLASS_$_myCustomView in myCustomView.o
I have other classes in my project that are inherit Cocoa classes without a problem. I don't have any errors if I make it inherit from classes that are part of Framework or CoreData (eg NSObject, NSArray, NSEntityDescription).
Any suggestions?
Upvotes: 0
Views: 361
Reputation: 11
Somehow the some of the Frameworks become disconnected in XCode. Under if you control-click Frameworks and select GetInfo, it the box had a dash through it (meaning it was partially selected). Clicking it again activated it for all classes.
Upvotes: 1
Reputation: 49344
Check if your subclassed NSViewController
implementation file is in the "Compile sources" build phase of your active target.
Upvotes: 1