library not found for -lWeChatSDK
**遇到错误的原因:项目上传到SVN并打了分支,想着以后规范一点,不要一直在主干上改来改去(虽然是自己一个人管理的)
上传后check out到本地发现这种错误。
1. library not found for -lSocialQQ (第一次错误)
经过尝试重新pod install后解决()
2. library not found for -lssl (第二次错误)
经过尝试把包含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
可以看到和融云有关,项目中用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,属于重复添加,删除掉就好了,参考解决duplicate symbols for architecture x86_64编译错误问题
6. ld: library not found for -lopencore-amrnb
项目中搜索opencore-amrnb,看到:
猜测和cocoapods有关(不太明白这是什么opencore-amrnb),于是编辑podfile文件,先删除所有第三方,再重新pod install解决
网友评论