Anand
Anand

Reputation: 13

Gcc-4.2 failed with exit code 1 Error

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

Upvotes: 1

Views: 11135

Answers (4)

SURESH SANKE
SURESH SANKE

Reputation: 1663

Add required library from the SDK libraries.

Upvotes: 0

user557219
user557219

Reputation:

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.

Upvotes: 2

Bolek Tekielski
Bolek Tekielski

Reputation: 1214

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.

Upvotes: 0

Alan Zeino
Alan Zeino

Reputation: 4396

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

Upvotes: 0

Related Questions