包含两次x86_64架构的重复符号 [英] duplicate symbols for architecture x86_64 framework included twice

查看:72
本文介绍了包含两次x86_64架构的重复符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是常规重复符号错误.我正在使用AFNetworking库与可可豆荚联网.我还使用了在构建阶段部分中已添加到目标使用库链接二进制文件"列表中的第三方框架.

This is not the regular duplicate symbols error. I am using AFNetworking library for networking with cocoa pods. I also using a third party framework that has been added to the target "Link Binary With Libraries" list in build phases section.

不幸的是,该第三方框架包括AFNetworking,显然它正被AFNetworking用于联网.

Unfortunately, This third party framework includes the AFNetworking that apparently is being used by it for networking.

因此,可以确定已产生此错误.知道如何解决吗?

Therefore, it makes sense that this error has been produced. Any idea how can this be solved?

这里显示了在AFNetworking和OPPWAMobile框架中定义了kAFUploadStream3GSuggestedPacketSize符号.以及另外59个符号.

Here it shows that kAFUploadStream3GSuggestedPacketSize symbol is defined in the afnetworking and in the OPPWAMobile framework. along with another 59 symbols.

重复符号_kAFUploadStream3GSuggestedPacketSize位于:/Users/khaled/Library/Developer/Xcode/DerivedData/Saveto-fhceqhysbolbskawabayohjbtsra/Build/Products/Debug-iphonesimulator/AFNetworking/libAFNetworking.a(AFURLRequestSerialization.o)/Users/khaled/Development/iOS/Saveto/git@git.assembla.com:imena-develotpment-.29/OPPWAMobile.framework/OPPWAMobileld:体系结构x86_64 clang的60个重复符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)

duplicate symbol _kAFUploadStream3GSuggestedPacketSize in: /Users/khaled/Library/Developer/Xcode/DerivedData/Saveto-fhceqhysbolbskawabayohjbtsra/Build/Products/Debug-iphonesimulator/AFNetworking/libAFNetworking.a(AFURLRequestSerialization.o) /Users/khaled/Development/iOS/Saveto/git@git.assembla.com:imena-develotpment-.29/OPPWAMobile.framework/OPPWAMobile ld: 60 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Podfile:

platform :ios, '7.1'
source 'https://github.com/CocoaPods/Specs.git'

target 'Saveto' do
    pod 'SWTableViewCell', '~> 0.3.7'
    pod 'CocoaLumberjack', '~> 2'
    pod "AFNetworking"   , '~> 2'
    pod 'SDWebImage', '~>3.7'
    pod 'MMDrawerController', '~> 0.6.0'
    pod 'iRate'
    pod 'XLForm'
    pod "SwipeView", "~>1.3.2"
    pod "DAAlertController"
    pod "Mantle" , "~>2.0.4"
    pod 'pop', '~> 1.0'
    pod 'GoogleMaps', '~> 1.12'
    pod 'SVProgressHUD'
    pod 'FXBlurView'
    pod 'Fabric'
    pod 'Crashlytics'
end

推荐答案

对于AFNetworking的Pod导入与第3方库(恰好包含相同符号)的冲突,您是正确的.有两种解决方法,最好和最明智的方法是在Podfile中指定 use_frameworks!:

You are correct about the Pod import of AFNetworking clashing with the 3rd party library which happens to contain the same symbols. There are are couple of ways to resolve it, the best and most sensible one would be to specify use_frameworks! in your Podfile:

platform :ios, '9.0'
use_frameworks!
  target 'Saveto' do
    pod 'SWTableViewCell', '~> 0.3.7'
    pod 'CocoaLumberjack', '~> 2'
    pod 'AFNetworking'   , '~> 2'
    pod 'SDWebImage', '~>3.7'
    pod 'MMDrawerController', '~> 0.6.0'
    pod 'iRate'
    pod 'XLForm'
    pod 'SwipeView', '~>1.3.2'
    pod 'DAAlertController'
    pod 'Mantle' , '~>2.0.4'
    pod 'pop', '~> 1.0'
    pod 'GoogleMaps', '~> 1.12'
    pod 'SVProgressHUD'
    pod 'FXBlurView'
    pod 'Fabric'
    pod 'Crashlytics'
end

我想您也可以使用post_install方法重命名符号,尽管这可能无法解决所有问题.使用上述方法后应该不会有任何问题.

I suppose you could also rename the symbols with a post_install method, although that might not resolve everything; there shouldn't be any issues after using the method above though.

这篇关于包含两次x86_64架构的重复符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆