美文网首页
使用cocoapods时报错 _OBJC_CLASS_$_XXX

使用cocoapods时报错 _OBJC_CLASS_$_XXX

作者: melody5 | 来源:发表于2018-05-21 10:42 被阅读14次

使用cocoapods导入其他的框架,发现调用的时候总是报错。

Undefined symbols for architecture x86_64:

  "_OBJC_CLASS_$[objectName]", referenced from:

      objc-class-ref in [objectName].o

ld: symbol(s) not found for architecture x86_64

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.

之前用了手动导入SDK,修改了Other Linker Flags

image

所以解决办法就是:

按照提示,增加$(inherited)

image

添加之后,问题终于解决

相关文章

网友评论

      本文标题:使用cocoapods时报错 _OBJC_CLASS_$_XXX

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