-4

当我建造时,我得到

 Ld /Users/Shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Products/Debug-iphoneos/appname.app/appname normal armv7
    cd "/Users/shouri/Desktop/appname Project/appname"
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Products/Debug-iphoneos -F/Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Products/Debug-iphoneos -filelist /Users/shouri/Library/Developer/Xcode/DerivedDataappname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/appname.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework CoreData -framework AVFoundation -framework MobileCoreServices -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Products/Debug-iphoneos/appname.app/appname

duplicate symbol _OBJC_IVAR_$_HatsCamera.cameraSwitch in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_IVAR_$_HatsCamera.FrontCamera in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appaname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_IVAR_$_HatsCamera.captureImage in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_IVAR_$_HatsCamera.stillImageOutput in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_IVAR_$_HatsCamera.haveImage in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_IVAR_$_HatsCamera.imagePreview in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_CLASS_$_HatsCamera in:
    /Users/shouri/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shourio/Library/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
duplicate symbol _OBJC_METACLASS_$_HatsCamera in:
    /Users/shouriLibrary/Developer/Xcode/DerivedData/appname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/HatsCamera.o
    /Users/shouri/Library/Developer/Xcode/DerivedDataappname-defwdplzurhoraeqlkbatxopkutg/Build/Intermediates/appname.build/Debug-iphoneos/appname.build/Objects-normal/armv7/BottomsCamera.o
ld: 8 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我怎样才能摆脱这个问题,因为我已经浏览了数周的互联网,但找不到适合我的问题的最佳答案..

4

2 回答 2

1
duplicate symbol _OBJC_IVAR_$_HatsCamera.cameraSwitch in:
/Users/shouri/Library/.../HatsCamera.o
/Users/shouri/Library/.../BottomsCamera.o

HatsCamera.cameraSwitch似乎不止一次被宣布。这只是其中一个错误,但其他错误是相同的。

如果您无法找到错误,请发布源代码,以便我们查看问题所在。

于 2013-08-20T11:58:55.800 回答
0
ld: 8 duplicate symbols for architecture armv7

是你错误的原因。似乎在您的项目中某处您有 2 个相同的文件,这导致了错误。

彻底查看项目和项目文件夹中的文件HatsCamera.mBottomsCamera.m尝试完全删除它们并阅读它们。

于 2013-08-20T11:56:03.103 回答