XCode 4.2构建失败,错误代码为1(没有问题),但适用于XCode 3.2.6

时间:2011-12-18 13:34:44

标签: iphone ios build

我有这个奇怪的问题。 我正在尝试迁移到XCode 4.2,所以我在XCode 4.2中打开了我的项目,并尝试为iOS设备构建我的项目。构建失败,没有任何问题或任何解释。最奇怪的是,该模型在模拟器和XCode 3.2.6(设备和模拟器)上没有问题。

这是我在构建时得到的结果:

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

没有其他问题。 我检查了我的Bundle Identifier和Product name,它们不包含非法字符(仅限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 个答案:

答案 0 :(得分:0)

我终于找到了解决方案! (感谢Jesse Rusak的建议) 我使用CloudMade的库来显示地图。这个库可能导致了这个问题。 我删除了库并删除了它的所有库和标题搜索路径。 之后我将CloudMade项目的基础SDK更改为"最新的iOS"并再次将库重新添加到我的项目中。将它重新添加到库和标题搜索路径就可以了!它有效!

谢谢大家!