I'm getting the following message error:
".objc_class_name_ClassA", referenced from:
literal-pointer@__OBJC@__cls_refs@CBLookupItemBook in ClassB.o
ld: symbol(s) not found
But both classA and classB are in the target Compile Sources.
I've cleaned, deleted the build folder, and restarted Xcode. Still t开发者_Go百科he same issue.
Checked that the files containing the classes are part of the target you are trying to compile. View > Utilities > Show File Inspector, Target Membership in the right inspector panel.
There was a misspelling in the class name... not sure why the compiler didn't complain about it
For Xcode 4, if you're having this issue, you may want to click on your project -> target -> build phases -> compile sources. Verify that the missing class is actually being compiled. If it isn't, press the plus button at the end of the list and add it. I had this problem when I trashed a class (because it was based off of a UIViewController but I wanted to base it off of a UITableViewController) and then added another class with the same name. It seemed Xcode was tripped up by that and didn't automatically add the class to be compiled.
精彩评论