(转) error: linker command failed with exit code 1 (use -v to see invocation)

转自:http://blog.csdn.net/tiantian1980/article/details/9175777
 

像这样的一大堆,总体说编译链接时错误

 

/Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Products/Debug-iphonesimulator/ClothingOrders.app/ClothingOrders normal i386

    cd /Users/zhangtianjian/Desktop/SVN

    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1

    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Products/Debug-iphonesimulator -L/Users/zhangtianjian/Desktop/SVN/ZBarSDK -F/Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Products/Debug-iphonesimulator -filelist /Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Intermediates/ClothingOrders.build/Debug-iphonesimulator/ClothingOrders.build/Objects-normal/i386/ClothingOrders.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -lz -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework CoreData -liconv -framework QuartzCore -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -lzbar -o /Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Products/Debug-iphonesimulator/ClothingOrders.app/ClothingOrders

 

duplicate symbol _OBJC_METACLASS_$_EntityOrdersTotal in:

    /Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Intermediates/ClothingOrders.build/Debug-iphonesimulator/ClothingOrders.build/Objects-normal/i386/EntityOrdersTotal-1502FC93349A1D59.o

duplicate symbol _OBJC_CLASS_$_EntityOrdersTotal in:

    /Users/zhangtianjian/Library/Developer/Xcode/DerivedData/ClothingOrders-bcmqkcjsfgyibbgetgiyczzqcerj/Build/Intermediates/ClothingOrders.build/Debug-iphonesimulator/ClothingOrders.build/Objects-normal/i386/EntityOrdersTotal-1502FC93349A1D59.o

ld: 2 duplicate symbols for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)


ios开发这个错误一定少不了,现总结如下,一般这三方面的问题,如果不是哪你真可麻烦了

1.引用出错,把***.h弄成了.m,检查一下你的所有引用;

2.再就是你引用第三方的库,你添加文件是系统没有所第三方库的.m文件参入的编译中去,你向项目添加文件得注意了;

3.就是不小心添加的重复的类,向Entity之类,具体你可以看这里http://stackoverflow.com/questions/2264455/iphone-duplicate-symbol-error

顺便说一下http://stackoverflow.com/这个网站是iso开发不可少的一个网站;

4.有些frameworks没有添加进来也会出现上面的问题;

如果有第五的,请留言!

posted @ 2015-06-14 11:23  Qingyun_Qearl  阅读(288)  评论(0编辑  收藏  举报