将静态库导入其他库时,架构x86_64的重复符号

时间:2015-03-10 12:07:51

标签: ios objective-c static-libraries

我得到了来自客户的IOS,Objective C项目,我想添加新功能和重构。 Project使用CocoaPods。在podfile中有一个来自bitbucket的私有库,需要登录。客户已向我发送了一封电子邮件,表示他没有登录,但他会向我发送源代码。这是我的问题。想象一下库A和库B(BlocksKit的自定义分支)。 A是依赖的,并且正在使用库B,而Main项目使用库A.所以我将库B构建为静态库,然后将其导入A.但是我得到了(null):18个重复符号用于体系结构x86_64 这是日志:

duplicate symbol _OBJC_IVAR_$_BKControlWrapper._controlEvents in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/UIControl+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(UIControl+BlocksKit.o)
duplicate symbol _OBJC_IVAR_$_BKControlWrapper._handler in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/UIControl+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(UIControl+BlocksKit.o)
duplicate symbol _OBJC_CLASS_$_BKControlWrapper in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/UIControl+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(UIControl+BlocksKit.o)
duplicate symbol _OBJC_METACLASS_$_BKControlWrapper in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/UIControl+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(UIControl+BlocksKit.o)
duplicate symbol _OBJC_IVAR_$_BKInvocationGrabber._target in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSInvocation+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSInvocation+BlocksKit.o)
duplicate symbol _OBJC_IVAR_$_BKInvocationGrabber._invocation in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSInvocation+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSInvocation+BlocksKit.o)
duplicate symbol _OBJC_CLASS_$_BKInvocationGrabber in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSInvocation+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSInvocation+BlocksKit.o)
duplicate symbol _OBJC_METACLASS_$_BKInvocationGrabber in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSInvocation+BlocksKit.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSInvocation+BlocksKit.o)
duplicate symbol _OBJC_IVAR_$__BKObserver._observee in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_IVAR_$__BKObserver._keyPaths in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_IVAR_$__BKObserver._context in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_IVAR_$__BKObserver._task in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_IVAR_$__BKObserver._isObserving in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_CLASS_$__BKObserver in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_METACLASS_$__BKObserver in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKBlockObservation.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKBlockObservation.o)
duplicate symbol _OBJC_IVAR_$__BKWeakAssociatedObject._value in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKAssociatedObjects.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKAssociatedObjects.o)
duplicate symbol _OBJC_METACLASS_$__BKWeakAssociatedObject in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKAssociatedObjects.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKAssociatedObjects.o)
duplicate symbol _OBJC_CLASS_$__BKWeakAssociatedObject in:
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Intermediates/TAEssentials.build/Debug-iphonesimulator/Tests.build/Objects-normal/x86_64/NSObject+BKAssociatedObjects.o
    /Users/jozefmatus/Library/Developer/Xcode/DerivedData/TAEssentials-fbdhitikjlcggqbtvzfisnljuull/Build/Products/Debug-iphonesimulator/libTAEssentials.a(NSObject+BKAssociatedObjects.o)
ld: 18 duplicate symbols for architecture x86_64

我已经尝试过查看表单#import" whatever.m",或者在没有任何运气的情况下查看编译源代码是否重复。所以我绝望了。 任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

从项目中删除对.o库文件的引用并将其添加回项目..有时这可以解决您遇到的问题