IOS SDK 客户端编译错误[与2.1 版MiPushSDK同时编译(1.7版时无以上问题)]
我刚开始用环信,原来项目同时使用MiPush,
当Other Linker Flags 只包含-ObjC时有如下错误:
duplicate symbol _OBJC_CLASS_$_XMPPElement in:
[$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/Lighting/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_METACLASS_$_XMPPElement in:
[$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/Lighting/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_IVAR_$_DDListEnumerator.numElements in:
[$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClient
...
当增加-force_load时[模拟器下]
Undefined symbols for architecture x86_64:
"webrtc::FIRFilterSSE2::FIRFilterSSE2(float const*, unsigned long, unsigned long)", referenced from:
webrtc::FIRFilter::Create(float const*, unsigned long, unsigned long) in libEaseMobClientSDK.a(fir_filter.o)
[真机下]
duplicate symbol _WebRtcNsx_Create in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)
duplicate symbol _WebRtcNsx_Free in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)
duplicate symbol _WebRtcNsx_Init in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)
...
duplicate symbol _OBJC_CLASS_$_XMPPElement in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_METACLASS_$_XMPPElement in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_IVAR_$_DDListEnumerator.numElements in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(DDList.o)
[$Project]/3rdParty/MiSDK/libMiPushSDK.a(DDList.o)
...
以上情况如何处理,谢谢
当Other Linker Flags 只包含-ObjC时有如下错误:
duplicate symbol _OBJC_CLASS_$_XMPPElement in:
[$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/Lighting/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_METACLASS_$_XMPPElement in:
[$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/Lighting/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_IVAR_$_DDListEnumerator.numElements in:
[$Project]/Lighting/3rdParty/EaseMobSDK/lib/libEaseMobClient
...
当增加-force_load时[模拟器下]
Undefined symbols for architecture x86_64:
"webrtc::FIRFilterSSE2::FIRFilterSSE2(float const*, unsigned long, unsigned long)", referenced from:
webrtc::FIRFilter::Create(float const*, unsigned long, unsigned long) in libEaseMobClientSDK.a(fir_filter.o)
[真机下]
duplicate symbol _WebRtcNsx_Create in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)
duplicate symbol _WebRtcNsx_Free in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)
duplicate symbol _WebRtcNsx_Init in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(noise_suppression_x.o)
...
duplicate symbol _OBJC_CLASS_$_XMPPElement in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_METACLASS_$_XMPPElement in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(XMPPElement.o)
[$Project]/3rdParty/MiSDK/libMiPushSDK.a(XMPPElement.o)
duplicate symbol _OBJC_IVAR_$_DDListEnumerator.numElements in:
[$Project]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDK.a(DDList.o)
[$Project]/3rdParty/MiSDK/libMiPushSDK.a(DDList.o)
...
以上情况如何处理,谢谢
没有找到相关结果
已邀请:
6 个回复
[已注销]
roller
[已注销]
[已注销]
roller
上个回复中给出的Ld命令参数同样可以看到
-ObjC -force_load [$Project_src_dir]/3rdParty/EaseMobSDK/lib/libEaseMobClientSDKLite.a
看起来是MiPush和EaseMobSDK都使用了XMPP协议通信,又恰巧使用同样的无前缀命名的文件造成包重名,或是都使用了XMPPFramework这个第三方库
我暂时只能改成使用1.7版的MiPushSDK,在other Linker Flags只为-ObjC的情况,能编译通过[目前只是把环信的SDK加入依赖链,还没具体使用环信的API,还不清楚具体使用时是否会有问题]
donghai