链接器命令失败,退出代码为1

时间:2014-12-31 11:40:59

标签: ios

我有应用程序它运行良好,但我添加了聊天视图(Xib - .h - .m)文件和所有它没关系,但当我尝试在我的iPhone上运行它时我遇到了这个问题:

linker command failed with exit code 1 

    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._totalBytesRead in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._uploadProgress in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._downloadProgress in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._authenticationChallenge in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._cacheResponse in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._redirectResponse in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_CLASS_$_AFURLConnectionOperation in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_METACLASS_$_AFURLConnectionOperation in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation2.o
duplicate symbol _OBJC_CLASS_$_AFHTTPRequestOperation in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFHTTPRequestOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFHTTPRequestOperation2.o
duplicate symbol _OBJC_METACLASS_$_AFHTTPRequestOperation in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFHTTPRequestOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFHTTPRequestOperation2.o
duplicate symbol _AFNetworkingOperationFailingURLResponseErrorKey in:
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLConnectionOperation.o
    /Users/ZzXzZ/Library/Developer/Xcode/DerivedData/9otk-exeoubkkvfbvbkejxccjhfiqjkrw/Build/Intermediates/9otk.build/Debug-iphoneos/9otk.build/Objects-normal/armv7/AFURLResponseSerialization2.o
ld: 71 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:0)

从日志中可以看出你已经用后缀2重命名了AFxxxxx.h [m]文件。 尝试删除这些额外的文件(AFxxxxx2.h [m])。清理项目并重新构建。祝你好运。