使用Objection.h时出现链接器错误

时间:2015-08-08 15:32:08

标签: linker

我目前正在使用Objection.h和一个名为Linklyy的开源项目,我收到以下链接器错误:

ld: warning: ignoring file /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection.framework/Objection, file was built for x86_64 which is not the architecture being linked (i386): /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection.framework/Objection
duplicate symbol _OBJC_IVAR_$_JSObjectFactory._injector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectFactory.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectFactory.o)
duplicate symbol _OBJC_CLASS_$_JSObjectFactory in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectFactory.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectFactory.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectFactory in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectFactory.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectFactory.o)
duplicate symbol _OBJC_CLASS_$_JSObjection in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjection.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjection.o)
duplicate symbol _OBJC_METACLASS_$_JSObjection in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjection.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjection.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionBindingEntry._instance in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionBindingEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionBindingEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionBindingEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionBindingEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionBindingEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionBindingEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionBindingEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionBindingEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionEntry.injector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionEntry.o)
duplicate symbol _OBJC_IVAR_$___JSObjectionInjectorDefaultModule._injector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._globalContext in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._context in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._modules in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._eagerSingletons in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_CLASS_$___JSObjectionInjectorDefaultModule in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_METACLASS_$___JSObjectionInjectorDefaultModule in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionInjector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionInjector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjectorEntry._lifeCycle in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjectorEntry._classEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjectorEntry._storageCache in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionInjectorEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionInjectorEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_IVAR_$___JSClassProvider._class in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionModule._bindings in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionModule._eagerSingletons in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_CLASS_$___JSClassProvider in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_METACLASS_$___JSClassProvider in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionModule in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionModule in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._provider in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._lifeCycle in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._storageCache in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._block in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionProviderEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionProviderEntry in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionRuntimePropertyReflector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionRuntimePropertyReflector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionRuntimePropertyReflector.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionRuntimePropertyReflector in:
    /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionRuntimePropertyReflector.o)
    /Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionRuntimePropertyReflector.o)
ld: 40 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我看到应该根据警告更改架构,但是也存在链接器错误。任何人都可以帮我弄清楚墨水错误的原因吗?我确信它与Objection.h有关。如有必要,请不要犹豫,要求提供更多信息。

1 个答案:

答案 0 :(得分:0)

检查JSObjection的目标。它看起来像App目标中包含的JSObjection和Pods目标。 libJSObjection.a也可能与Pod和主App相关联。