ios - Apple Mach-O 链接器错误 - ld : file not found: -ObjC

标签 ios objective-c iphone xcode clang

我继承了一个 iOS 项目,甚至无法构建它。我不断收到以下错误:

ld: file not found: -ObjC
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我看过关于“找不到文件”错误的帖子,但没有一个与看起来像开关的“-ObjC”位有关。

有什么想法吗?

最佳答案

-ObjCld 的有效选项,但是如果其他选项被破坏,则可能会混淆 ld。例如,-framework 选项需要一个参数,如果缺少该参数(框架的名称),则会导致您看到的那种错误。

ld ... -framework -ObjC

但是,如果没有看到完整的链接器命令行,我无法准确地告诉您错误出在哪里。

关于ios - Apple Mach-O 链接器错误 - ld : file not found: -ObjC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30753962/

相关文章:

objective-c - 如何使用 NSNotificationCenter 传递对象

iphone - 淡入/淡出整个 View ,一个 subview 除外

iphone - EGOTableViewPullRefresh - 由于链接问题无法构建

objective-c - 使用 CHCSVWriter 保存 CSV 文件

ios - 如何获取iPhone网络的信号强度(RSRP/RSSI/RSRQ/SINR),小区ID(LTE/3G/2G)

iphone - 从相机拍照并在 UIImageView 中显示

objective-c - 如何使用 NSAttributedString 防止文本在 NSTableView 中换行

iphone - 设置包中组的标题页脚

objective-c - 返回 NavigationController Root View 时会调用哪些方法?

objective-c - 在 NSMutableArray 中搜索 NSString