1
votes

I am getting this error when i am trying to build my app. In the simulator it works fine but when coming to build for ipa it gives the following error:

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

What is causing this error?

Edited

Ld build/halalgauge.build/Release-iphoneos/halalgauge.build/Objects-normal/armv6/halalgauge normal armv6 cd /Users/admin/Desktop/ShopSavvy setenv IPHONEOS_DEPLOYMENT_TARGET 4.2 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/admin/Desktop/ShopSavvy/build/Release-iphoneos -L/Users/admin/Desktop/ShopSavvy -L/Users/admin/Desktop/ShopSavvy/Classes/ZBarSDK -L/Users/admin/Desktop/ShopSavvy/Classes/ScannerKit-4.0.3 -F/Users/admin/Desktop/ShopSavvy/build/Release-iphoneos -filelist /Users/admin/Desktop/ShopSavvy/build/halalgauge.build/Release-iphoneos/halalgauge.build/Objects-normal/armv6/halalgauge.LinkFileList -Xlinker -map -Xlinker /Users/admin/Desktop/ShopSavvy/build/halalgauge.build/Release-iphoneos/halalgauge.build/halalgauge-LinkMap-normal-armv6.txt -dead_strip all_load -lstdc++ -miphoneos-version-min=4.2 -framework CoreGraphics -framework AVFoundation -framework CoreVideo -framework CoreMedia -framework Foundation -framework AudioToolbox -framework QuartzCore -framework UIKit -framework iAd -lsqlite3.0 -framework MessageUI -framework AddressBook -framework AddressBookUI -framework MapKit -framework CoreLocation -liconv -lScannerKit -framework SystemConfiguration -framework MediaPlayer -o /Users/admin/Desktop/ShopSavvy/build/halalgauge.build/Release-iphoneos/halalgauge.build/Objects-normal/armv6/halalgauge

arm-apple-darwin10-gcc-4.2.1: all_load: No such file or directory Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

4
Could be due to any number of errors in your code.Rafe Kettler
i have only 2 errors the two errors are sameAnand
Yeah but what are the errors?Rafe Kettler
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1Anand
This is an old post, but just in case: see this post Basically, the link from gcc-4.2 to llvm-gcc-4.2 in /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ was missinglucasart

4 Answers

2
votes

If you inspect the linker invocation, you’ll see the following:

-dead_strip all_load -lstdc++

The linker interprets that all_load as a file that must be linked, hence the error:

arm-apple-darwin10-gcc-4.2.1: all_load: No such file or directory

You need to specify -all_load (with an hyphen) instead of all_load in the linker flags.

0
votes

Restart your Mac, and if all else fails choose either LLVM-GCC or LLVM as a compiler.

0
votes

Could be due to multiple errors.

In XCode's build window select All Messages, that should give more meaningful information, which you can post here to help trace the problem.

0
votes

Add required library from the SDK libraries.