2011-12-18 51 views
0

我有這個奇怪的問題。 我試圖轉移到XCode 4.2,所以我在XCode 4.2中打開了我的項目,並嘗試爲iOS設備構建我的項目。構建失敗,沒有問題或任何解釋。最奇怪的是,該項目對Simulator和XCode 3.2.6(設備和模擬器)沒有任何問題。XCode 4.2編譯失敗,出現錯誤代碼1(沒有問題),但在XCode 3.2.6上工作

這是構建結果時,我得到:

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1 

沒有其他問題。 我檢查了我的Bundle標識符和產品名稱,它們不包含非法字符(僅限a-zA-Z)。 我也嘗試用Apple的LLVM 3.0獲得相同的結果。 供應配置文件也被雙重檢查。

還有什麼可能導致這種情況嗎?我能做什麼?

編輯: 下面是從日誌細節:

Ld /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal armv7 
    cd /Users/user/Documents/Projects/MyApp 
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.0 
    setenv PATH "/Developer/Platforms/iPhoneOS.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/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos -LRouteMe/MapView -LRouteMe/MapView/GTM -LRouteMe/MapView/Map -LRouteMe/MapView/UnitTesting -LRouteMe/MapView/Map/Cache.xcdatamodel -LRouteMe/MapView/Map/FMDB -LRouteMe/MapView/Map/Resources -F/Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos -filelist /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList -dead_strip -ObjC -all_load -miphoneos-version-min=4.0 /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos/libMapView.a -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -framework CoreLocation -framework Foundation -framework MapKit -framework MediaPlayer -framework OpenAL -framework QuartzCore -framework SystemConfiguration -framework UIKit -lsqlite3.0 -lstdc++.6 -framework CoreData -framework StoreKit -framework CoreMotion -o /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos/MyApp.app/MyApp 

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1 
+1

請嘗試查看詳細的構建日誌併發布它?在問題導航器(命令-4)中右鍵單擊問題並選擇「在日誌中顯示」以進入構建日誌。 – 2011-12-18 13:43:31

+0

Hrm。這不是很多信息。出於各種原因,似乎很多人都有這個問題。嘗試清理生成文件夾? – 2011-12-18 14:05:33

+0

我做了...不幸的是它沒有幫助。 – MCO 2011-12-18 14:14:50

回答

0

我終於找到了解決辦法! (感謝Jesse Rusak的建議) 我使用CloudMade的庫來顯示地圖。這個庫可能導致了這個問題。 我刪除了庫並刪除了它的所有庫和頭搜索路徑。 之後,我將CloudMade項目的基礎SDK更改爲「最新的iOS」,並再次將該庫添加到我的項目中。重新添加到庫和標題搜索路徑,就這些了!有效!

謝謝大家!