两个sdk的不同的其他链接器标志

时间:2016-11-13 13:26:52

标签: ios objective-c build settings xcode8

在我的项目中我需要外国SDK。第一个sdk始终使用标志-ObjC和-all_load,第二个不需要这些标志。如果我为第二个sdk设置了两个标志,我会收到一些重复符号消息。如果我删除了标记,则第一个sdk会将错误无法识别的选择器发送给实例

如何解决此问题?有没有办法说标志-ObjC和-all_load从第二个sdk中排除?

编辑: 第一个sdk是dropbox iOS sdk,它安装在pod上,需要标志-ObjC和-all_load。

第二个sdk有一些.h和.m文件和一个链接库libMTProtocol.a。

如果在其他链接器标志中启用了标志,则会收到以下重复消息:

duplicate symbol _OBJC_CLASS_$_MTExchangeDataThermoFrameFactory in:
duplicate symbol _OBJC_METACLASS_$_MTExchangeDataThermoFrameFactory in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._warningHumidity in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._warningDewPoint in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._packetNumber in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._warningAmbTemp in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._timestamp in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._laserOn in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._alarm in:
duplicate symbol _OBJC_CLASS_$_MTExchangeDataThermoInputMessage in:
duplicate symbol _OBJC_METACLASS_$_MTExchangeDataThermoInputMessage in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._mode in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._temperatureMode in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._autoSync in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._measID in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._uniqueID in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._component3 in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._component2 in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoInputMessage._component1 in:
duplicate symbol _OBJC_CLASS_$_MTExchangeDataThermoMessageFactory in:
duplicate symbol _OBJC_METACLASS_$_MTExchangeDataThermoMessageFactory in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoOutputMessage._packetNumber in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoOutputMessage._syncControl in:
duplicate symbol _OBJC_CLASS_$_MTExchangeDataThermoOutputMessage in:
duplicate symbol _OBJC_METACLASS_$_MTExchangeDataThermoOutputMessage in:
duplicate symbol _OBJC_IVAR_$_MTExchangeDataThermoOutputMessage._mode in:
ld: 26 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

所有重复的符号都是libMTProtocol.a库中的引用。

0 个答案:

没有答案