2011-09-05 175 views
1

我有這個錯誤的問題上:我的應用程序是在模擬器上運行,但不是設備

Undefined symbols for architecture i386: 

當我建停停,它成功地在模擬器上的設備上運行,但沒有,我試着一個簡單的新項目,我嘗試在設備上運行它,它是確定的,但這個項目並沒有因爲這個錯誤的運行,完整的堆棧錯誤是這樣的:

Ld "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/RM Unit Tests.app/RM Unit Tests" normal i386 
    cd /Users/imac/Desktop/route-me-route-me-b07b654/MapView 
    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.3.sdk -L/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator -F/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator -filelist "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Intermediates/MapView.build/Debug-iphonesimulator/Unit Tests.build/Objects-normal/i386/RM Unit Tests.LinkFileList" -mmacosx-version-min=10.6 -framework Foundation -framework UIKit -Xlinker -objc_abi_version -Xlinker 2 /Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/libProj4.a -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework Foundation -lsqlite3 -framework QuartzCore -framework UIKit -o "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/RM Unit Tests.app/RM Unit Tests" 

Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_RMDBTileImage", referenced from: 
     objc-class-ref in RMTileImage.o 
ld: symbol(s) not found for architecture i386 
collect2: ld returned 1 exit status 

我改變構建模式,所以我選擇了設備(在我的情況下,我使用的iPod 4.3.5),現在我有其他錯誤:

'FavoriteCities.app' was built for 'i386', but the device 'iPod (Imac)' requires 'armv7' or compatible architecture. 

FavoriteCities是我的應用程序名稱,請幫我弄清楚可能是什麼原因造成的。

+1

i386架構是模擬器。看起來你還在爲模擬而不是設備構建。 – progrmr

+0

嗨,我選擇了設備,第一個錯誤已解決,但現在我有一個新的錯誤,請看看我的編輯,thanx提前:) – Malloc

回答

1

您需要更改設備構建的構建體系結構。它應該是默認的iOS應用程序armv6/7,但我想你或你搞砸了這些設置。

(在Xcode中4)選擇你的項目,選擇Build Settings選項卡,並確保它看起來是這樣的:

enter image description here

相關問題