2011-03-24 58 views
2

我需要麻雀框架(http://www.sparrow-framework.org/)/ xcode 4 /和我的項目的一些幫助。我得到以下錯誤:麻雀框架重複的符號錯誤

Ld /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator/iDoubtIt.app/iDoubtIt normal i386 
    cd /Users/alex/Dropbox/iDoubtIt/iDoubtIt-Sparrow 
    setenv MACOSX_DEPLOYMENT_TARGET 10.6 
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin" 
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator -F/Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator -filelist /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Intermediates/iDoubtIt.build/Debug-iphonesimulator/iDoubtIt.build/Objects-normal/i386/iDoubtIt.LinkFileList -mmacosx-version-min=10.6 -ObjC -all_load -Xlinker -objc_abi_version -Xlinker 2 /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator/libSparrow.a -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework AVFoundation -framework AudioToolbox -framework OpenAL -o /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator/iDoubtIt.app/iDoubtIt 

ld: duplicate symbol _OBJC_IVAR_$_AIPlayer.hand in /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Intermediates/iDoubtIt.build/Debug-iphonesimulator/iDoubtIt.build/Objects-normal/i386/Game.o and /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Intermediates/iDoubtIt.build/Debug-iphonesimulator/iDoubtIt.build/Objects-normal/i386/ApplicationDelegate.o for architecture i386 
collect2: ld returned 1 exit status 
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 

在此先感謝。

+0

發佈問題時請注意標記和格式。 – 2011-03-24 14:42:21

回答

0

也許你已經在你的「Game.m」或「ApplicationDelegate.m」文件中導入了一個實現文件(* .m文件)。你不應該導入實現文件。這會導致您的實現文件被編譯兩次。這會導致重複的符號錯誤。

要解決該問題,您應該將您的導入行從foo.m修復爲foo.h