美文网首页
使用cocoapods导入第三方后 报错_OBJC_CLASS_

使用cocoapods导入第三方后 报错_OBJC_CLASS_

作者: 胡伟红 | 来源:发表于2017-12-27 14:51 被阅读12次

使用cocoapods导入第三方后 报错_OBJC_CLASS_$_XXX

我们手动导入第三方库的时候,感觉管理不是很方便,于是会选择使用Cocoapods管理。现在记录一下使用心得,当使用cocoapods导入afnetworking或者其他框架的时候,发现调用的时候总是报错。

  "_OBJC_CLASS_$_SVProgressHUD", referenced from:

      objc-class-ref in XXXX.o

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 在网上搜索了一堆的攻略,然而这并没有什么卵用。

经过不断地搜索终于在网上看到了和我有相同问题的文章,解决了这个问题。

他是通过这个发现解决方法的

用cocoapod更新框架的时候,发现终端的一段警告

[!] The `myQQ [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation

    - Use the `$(inherited)` flag, or

    - Remove the build settings from the target.

这下有了思路了,原来之前手动导入第三方库的时候,修改了Other Linker Flags

所以解决办法就是:

按照提示,增加$(inherited)

添加之后,问题终于解决

看到的文章链接:http://www.cnblogs.com/jyking/p/5319045.html

相关文章

网友评论

      本文标题:使用cocoapods导入第三方后 报错_OBJC_CLASS_

      本文链接:https://www.haomeiwen.com/subject/mxsugxtx.html