2012-04-10 36 views
0
Ld /Users/rajeshmedampudi/Library/Developer/Xcode/DerivedData/sampleResource-flngddqnaawregcrrshzpianssjc/Build/Products/Debug-iphonesimulator/sampleResource.app/sampleResource normal i386 
    cd /Users/rajeshmedampudi/Dropbox/Work/iphone/sampleResource 
    setenv MACOSX_DEPLOYMENT_TARGET 10.6 
    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/iPhoneSimulator5.1.sdk -L/Users/rajeshmedampudi/Library/Developer/Xcode/DerivedData/sampleResource-flngddqnaawregcrrshzpianssjc/Build/Products/Debug-iphonesimulator -F/Users/rajeshmedampudi/Library/Developer/Xcode/DerivedData/sampleResource-flngddqnaawregcrrshzpianssjc/Build/Products/Debug-iphonesimulator -filelist /Users/rajeshmedampudi/Library/Developer/Xcode/DerivedData/sampleResource-flngddqnaawregcrrshzpianssjc/Build/Intermediates/sampleResource.build/Debug-iphonesimulator/sampleResource.build/Objects-normal/i386/sampleResource.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/rajeshmedampudi/Library/Developer/Xcode/DerivedData/sampleResource-flngddqnaawregcrrshzpianssjc/Build/Products/Debug-iphonesimulator/sampleResource.app/sampleResource 

Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_User", referenced from: 
     objc-class-ref in AppDelegate.o 
    "_OBJC_CLASS_$_AuthenticationViewController", referenced from: 
     objc-class-ref in AppDelegate.o 
    "_OBJC_CLASS_$_AppHelpers", referenced from: 
     objc-class-ref in AppDelegate.o 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

這是我在嘗試運行該文件時得到的錯誤......我將這些類從另一個項目導入到這個基於非弧的項目中並轉換爲ARC。在成功移除所有對autorelease的引用並保留它之後,我得到了這個錯誤。爲iPhone編譯時Obj-class-ref錯誤

+0

重複變量在其他一些類中聲明。參考和清理目標,然後運行項目... – akk 2012-04-10 06:21:53

+0

我不認爲我有任何重複的變量....他們根本沒有包括在項目中。 – medampudi 2012-04-10 06:31:28

回答

2

您試過產品 - >清潔嗎? 或重新啓動XCode? 您是否確定已將所有內容包含在目標 - >構建階段 - >編譯源代碼中? Xcode爲你做這件事,但有時它會錯過任何東西。

+0

謝謝你解決了這個問題。 – medampudi 2012-04-10 06:30:31

+2

就這樣,未來的人可以知道,我的建議中哪一個起作用了? – 2012-04-10 08:15:43

+0

第二個..將文件添加到編譯源。我之前沒有看過它......不知何故錯過了它。 – medampudi 2012-04-10 08:47:00