2011-11-07 70 views
0

引用的任何一個可以告訴我這個錯誤的意思, 這是錯誤日誌的詳細信息:

Ld build/Debug-iphonesimulator/Holiday.app/Holiday normal i386 
cd /Users/Ahmed/Desktop/klazuka-Kal-b2e164c/Examples/Holiday 
setenv MACOSX_DEPLOYMENT_TARGET 10.6 
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -L/Users/Ahmed/Desktop/klazuka-Kal-b2e164c/Examples/Holiday/build/Debug-iphonesimulator -F/Users/Ahmed/Desktop/klazuka-Kal-b2e164c/Examples/Holiday/build/Debug-iphonesimulator -filelist /Users/Ahmed/Desktop/klazuka-Kal-b2e164c/Examples/Holiday/build/Holiday.build/Debug-iphonesimulator/Holiday.build/Objects-normal/i386/Holiday.LinkFileList -mmacosx-version-min=10.6 -all_load -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics /Users/Ahmed/Desktop/klazuka-Kal-b2e164c/src/build/Debug-iphoneos/libKal.a -lsqlite3 -o /Users/Ahmed/Desktop/klazuka-Kal-b2e164c/Examples/Holiday/build/Debug-iphonesimulator/Holiday.app/Holiday 

ld: warning: in /Users/Ahmed/Desktop/klazuka-Kal-b2e164c/src/build/Debug-iphoneos/libKal.a, missing required architecture i386 in file 
Undefined symbols: 
    "_OBJC_CLASS_$_KalViewController", referenced from: 
     objc-class-ref-to-KalViewController in HolidayAppDelegate.o 
ld: symbol(s) not found 
collect2: ld returned 1 exit status 

回答

2

這是一個鏈接錯誤,請確保KalViewController被添加到當前目標,選擇Get Info並轉到目標選項卡,確保勾選了該框。

+0

對不起,我仍然是iphone開發新手,你能告訴我更多的細節嗎? – Adham

+0

您的應用程序有一個目標,它基本上是一組文件和設置,它們告訴Xcode如何構建您的應用程序。將文件添加到項目中時,必須告訴Xcode文件需要鏈接到哪個目標。在你的情況下,文件沒有鏈接到你的目標,所以當Xcode來構建文件時,它找不到它。 –

0

在Kal項目的設置中,確保它是爲i386體系結構編譯的。

+0

這不是錯誤,只是警告 – Adham

+0

但是這是後續錯誤的原因。警告有告訴你什麼。 – MrMage

相關問題