library not found for -lWeChatSDK

library not found for -lWeChatSDK

**遇到錯誤的原因:項(xiàng)目上傳到SVN并打了分支,想著以后規(guī)范一點(diǎn),不要一直在主干上改來改去(雖然是自己一個人管理的)
上傳后check out到本地發(fā)現(xiàn)這種錯誤。
1. library not found for -lSocialQQ (第一次錯誤)
經(jīng)過嘗試重新pod install后解決()
2. library not found for -lssl (第二次錯誤)
經(jīng)過嘗試把包含ssl的文件夾整個替換一遍解決
3. library not found for -lWeChatSDK (第三次錯誤)
同樣替換包含WeChatSDK的文件夾
4.Undefined symbols for architecture arm64:

Undefined symbols for architecture x86_64:
  "_Decoder_Interface_exit", referenced from:
      -[RCAMRDataConverter decodeAMRToWAVEWithoutHeader:] in RongIMLib(RCAMRDataConverter.o)
      DecodeNarrowBandAMRFileToWAVEFile(char const*, char const*) in RongIMLib(RCNarrowBandWavToAmr.o)
  "_D_IF_exit", referenced from:
      DecodeWidthBandAMRFileToWAVEFile(char const*, char const*) in RongIMLib(RCWidthBandWavToAmr.o)
  "_E_IF_encode", referenced from:
      EncodeWidthBandWAVEFileToAMRFile(char const*, char const*) in RongIMLib(RCWidthBandWavToAmr.o)
  "_E_IF_exit", referenced from:
      EncodeWidthBandWAVEFileToAMRFile(char const*, char const*) in RongIMLib(RCWidthBandWavToAmr.o)
  "_E_IF_init", referenced from:
      EncodeWidthBandWAVEFileToAMRFile(char const*, char const*) in RongIMLib(RCWidthBandWavToAmr.o)
  "_Encoder_Interface_Encode", referenced from:
      RC_EncodePCMToAMR(char*, int, int, int) in RongIMLib(RCAMRDataConverter.o)
      EncodeNarrowBandWAVEFileToAMRFile(char const*, char const*, int, int) in RongIMLib(RCNarrowBandWavToAmr.o)
  "_Encoder_Interface_exit", referenced from:
      RC_EncodePCMToAMR(char*, int, int, int) in RongIMLib(RCAMRDataConverter.o)
      EncodeNarrowBandWAVEFileToAMRFile(char const*, char const*, int, int) in RongIMLib(RCNarrowBandWavToAmr.o)
  "_D_IF_init", referenced from:
      DecodeWidthBandAMRFileToWAVEFile(char const*, char const*) in RongIMLib(RCWidthBandWavToAmr.o)
  "_D_IF_decode", referenced from:
      DecodeWidthBandAMRFileToWAVEFile(char const*, char const*) in RongIMLib(RCWidthBandWavToAmr.o)
  "_Decoder_Interface_init", referenced from:
      -[RCAMRDataConverter decodeAMRToWAVEWithoutHeader:] in RongIMLib(RCAMRDataConverter.o)
      DecodeNarrowBandAMRFileToWAVEFile(char const*, char const*) in RongIMLib(RCNarrowBandWavToAmr.o)
  "_Decoder_Interface_Decode", referenced from:
      -[RCAMRDataConverter decodeAMRToWAVEWithoutHeader:] in RongIMLib(RCAMRDataConverter.o)
      DecodeNarrowBandAMRFileToWAVEFile(char const*, char const*) in RongIMLib(RCNarrowBandWavToAmr.o)
  "_Encoder_Interface_init", referenced from:
      RC_EncodePCMToAMR(char*, int, int, int) in RongIMLib(RCAMRDataConverter.o)
      EncodeNarrowBandWAVEFileToAMRFile(char const*, char const*, int, int) in RongIMLib(RCNarrowBandWavToAmr.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: Undefined symbol: _Decoder_Interface_exit
:-1: Undefined symbol: _D_IF_exit
:-1: Undefined symbol: _E_IF_encode
:-1: Undefined symbol: _E_IF_exit
:-1: Undefined symbol: _E_IF_init
:-1: Undefined symbol: _Encoder_Interface_Encode
:-1: Undefined symbol: _Encoder_Interface_exit
:-1: Undefined symbol: _D_IF_init
:-1: Undefined symbol: _D_IF_decode
:-1: Undefined symbol: _Decoder_Interface_init
:-1: Undefined symbol: _Decoder_Interface_Decode
:-1: Undefined symbol: _Encoder_Interface_init

可以看到和融云有關(guān),項(xiàng)目中用cocoapods集成了融云,1.先在podfile中刪除融云,2.重新pod 'RongCloudIM/IMKit','~> 2.9.16' ; 3.pod install 解決
5. ld: 5 duplicate symbols for architecture x86_64
這個原因是在解決上面4個問題的過程中在Link Binary With Libraries中加入了融云的fromwork,屬于重復(fù)添加,刪除掉就好了,參考解決duplicate symbols for architecture x86_64編譯錯誤問題
6. ld: library not found for -lopencore-amrnb
項(xiàng)目中搜索opencore-amrnb,看到:

opencore-amrnb.png

猜測和cocoapods有關(guān)(不太明白這是什么opencore-amrnb),于是編輯podfile文件,先刪除所有第三方,再重新pod install解決

終于搞定了

后面估計(jì)還會有問題。。。
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容