【发布时间】:2015-06-26 13:11:31
【问题描述】:
我已经通过XCode 6.1.1搭建了一个cocoa框架,也创建了一个通用版本的框架,然后当我将框架导入项目时,编译错误:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_UIResponder", referenced from:
_OBJC_CLASS_$_AppDelegate in AppDelegate.o
"_OBJC_METACLASS_$_UIResponder", referenced from:
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o
"_UIApplicationMain", referenced from:
_main in main.o
"_OBJC_METACLASS_$_UIViewController", referenced from:
_OBJC_METACLASS_$_ViewController in ViewController.o
"_OBJC_CLASS_$_UIViewController", referenced from:
_OBJC_CLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
想知道为什么吗? 以及如何分析问题的原因?
【问题讨论】:
-
您的 AppDelegate 是否在 Objective-C++(.mm 文件)中?我刚遇到这个问题,添加 UIKit.framework 进行链接解决了这个问题。我仍在寻找解释。
标签: ios objective-c frameworks xcode6