轉(zhuǎn)載自:http://www.reibang.com/p/87bb9a9c2a66
使用cocoapod加入第三方庫(kù)侄柔,打開(kāi)項(xiàng)目有時(shí)會(huì)出現(xiàn)編譯錯(cuò)誤既们,錯(cuò)誤如下
[objc]view plaincopy
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in AFNetworkingUtil.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
1、AFNetworkingUtil 是自己寫(xiě)的一個(gè)類(lèi)不铆,類(lèi)中用到了 pod中AFNetworking框架的頭文件2蝌焚、出現(xiàn)編譯錯(cuò)誤在stackoverflow找到這個(gè)問(wèn)答http://stackoverflow.com/questions/19213782/undefined-symbols-for-architecture-arm64?rq=13、解決步驟a誓斥、Build Setting -> Architectures&Valid Architectures 檢查配置是否正確
b只洒、確認(rèn)如圖無(wú)誤,再 在
Build Setting ->
linking 加入以下配置