所以今天我遇到了一个大问题。我在 xcode 4.3.2 上遇到了涉及我的 viewcontroller 的问题,如以下错误消息所示:
Undefined symbols for architecture i386: "_OBJC_CLASS_$_SecondViewController",
referenced from: objc-class-ref in Birdflix_ProViewController.o "_OBJC_CLASS_$_ThirdViewController",
referenced from: objc-class-ref in Birdflix_ProViewController.o "_OBJC_CLASS_$_FourthViewController",
referenced from: objc-class-ref in Birdflix_ProViewController.o "_OBJC_CLASS_$_Author",
referenced from: objc-class-ref in Birdflix_ProViewController.o
ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我注意到这些错误仅在我编写 IBActions 将我的 View Controller 链接到其他类时出现。如果我删除 IBActions,错误就会消失。感谢您的帮助。
最佳答案
终于找到答案了。在您的目标设置中,找到构建阶段并导航到编译源。一旦出现错误,只需将出现错误的 .m 文件添加到列表中即可。
关于ios - “_OBJC_CLASS_$_” ,引用自 : error in xcode 4. 3.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10302522/