最新的cocoapod導入xmpp的時候,會出現循環依賴,所以擼主選擇了手動導入。
一開始還用的挺開心的,后來,使用cocoapods導入其他的框架,發現調用的時候總是報錯。
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SV objc-class-ref in HJCXMPPTools.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 在網上搜索了一堆的攻略,cocoapods卸載重新按照了108遍,然而這并沒有什么卵用。 后來我再次用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. 這下有了思路了,原來我手動導入xmpp的時候,修改了Other Linker Flags 所以解決辦法就是: 按照提示,增加$(inherited) 添加之后,問題終于解決,擼主潸然淚下,困擾擼主2天的問題終于解決鳥~~。
新聞熱點
疑難解答