简体   繁体   English

XCode 4.2构建失败,错误代码为1(无问题),但在XCode 3.2.6上有效

[英]XCode 4.2 build failed with error code 1 (no issues), but works on XCode 3.2.6

I have this weird problem. 我有这个奇怪的问题。 I'm trying to move to XCode 4.2, so I opened my project in XCode 4.2 and tried to build my project for iOS device. 我试图移至XCode 4.2,所以我在XCode 4.2中打开了我的项目,并尝试为iOS设备构建我的项目。 The build failed with no issues or any explanation. 构建失败,没有任何问题或任何解释。 The weirdest thing is that the project is built with no problems for the Simulator and on XCode 3.2.6 (device and simulator). 最奇怪的是,该项目在模拟器和XCode 3.2.6(设备和模拟器)上都没有问题。

This is the result I get when building: 这是我在构建时得到的结果:

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

With no other issues. 没有其他问题。 I checked my Bundle Identifier and Product name and they do not contain illegal characters (only a-zA-Z). 我检查了我的捆绑包标识符和产品名称,它们不包含非法字符(仅a-zA-Z)。 I Also tried building with Apple's LLVM 3.0 which got the same result. 我还尝试使用Apple的LLVM 3.0进行构建,结果相同。 Provisioning profile was also double-checked. 供应配置文件也经过了双重检查。

Is there anything else that could cause that? 还有其他可能导致这种情况的原因吗? What can I do? 我能做什么?

edit: Here are the details from the log: 编辑:这是日志中的详细信息:

    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

I've finally found the solution! 我终于找到了解决方案! (thanks to Jesse Rusak's advice) I used CloudMade's library for displaying a map. (感谢Jesse Rusak的建议)我使用CloudMade的库来显示地图。 This library probably caused the problem. 该库可能引起了问题。 I removed the library and removed all the library and header search paths to it. 我删除了该库,并删除了它的所有库和标头搜索路径。 After that I changed the base SDK of CloudMade's projects to "Latest iOS" and re-added the library to my project again. 之后,我将CloudMade项目的基本SDK更改为“最新的iOS”,然后再次将该库重新添加到我的项目中。 Re-added it to the library and header search path and thats it! 将其重新添加到库和标头搜索路径中,就这样! it worked! 有效!

Thanks everyone! 感谢大家!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM