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
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.
Restart your Mac, and if all else fails choose either LLVM-GCC or LLVM as a compiler.
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.
Add required library from the SDK libraries.
Related
I am including another project to mine and I am getting this error even when I am including all the libraries needed.
this is the error details:
Ld /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/IMS3.app/IMS3 normal armv7
cd /Users/alialzahrani/Desktop/IMSFolder/mydoubs/iPhone/idoubs/branches/2.0/IMS3
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos -L/Users/alialzahrani/Desktop/IMSFolder/mydoubs/doubango/branches/2.0/doubango/thirdparties/iphone/lib/armv7 -F/Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos -filelist /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Intermediates/IMS3.build/Debug-iphoneos/IMS3.build/Objects-normal/armv7/IMS3.LinkFileList -dead_strip -fobjc-link-runtime -stdlib=libc++ -miphoneos-version-min=6.0 -framework AudioUnit -framework AVFoundation -framework CoreAudio -lsqlite3 -lresolv -framework AudioToolbox -framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreMedia -framework CoreVideo -framework SystemConfiguration -framework CoreGraphics /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libios_ngn_stack.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyDAV.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyHTTP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyIPSec.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyMEDIA.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyMSRP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyNET.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyRTP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinySAK.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinySDP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinySIGCOMP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinySIP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinySMS.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyWRAP.a /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/libtinyXCAP.a -framework UIKit -framework Foundation -o /Users/alialzahrani/Library/Developer/Xcode/DerivedData/IMS3-ezltqoccjhjpvuakngozvwcsppvh/Build/Products/Debug-iphoneos/IMS3.app/IMS3
ld: framework not found AudioUnit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and here is all the libraries that I did include :
and if did not include the framework I am getting 110 errors:
Audio Unit is just an umbrella framework, it doesn't have any actual dynamic libraries to link against, only headers. Don't add it to the project, and building will succeed. (The actual symbols for Audio Units are located in another framework, IIRC it's AudioToolbox.)
I have faced the same error when I was creating an application of Voice recorder.
you simply do one thing, just add AudioToolbox framework, CoreAudio framework. in your project and also #import <AudioToolbox/AudioToolbox.h>,
#import <CoreAudio/CoreAudioTypes.h>
I'm using webtrends which require a -load_all flag, app builds ok but wont archive
I read all the messages relating and non seem to help
Ld "/Users/julian/Library/Developer/Xcode/DerivedData/PwC_UK-dsueulkkaowyeycupeqjbvsziicn/ArchiveIntermediates/Data Collection Sample/IntermediateBuildFilesPath/PwC UK.build/Release-iphoneos/PwC UK.build/Objects-normal/armv6/PwC UK" normal armv6
cd "/Users/julian/Documents/Flat Earth/PwC [-] iPhone/PwC-UK-120206"
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/clang -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk "-L/Users/julian/Library/Developer/Xcode/DerivedData/PwC_UK-dsueulkkaowyeycupeqjbvsziicn/ArchiveIntermediates/Data Collection Sample/BuildProductsPath/Release-iphoneos" "-F/Users/julian/Library/Developer/Xcode/DerivedData/PwC_UK-dsueulkkaowyeycupeqjbvsziicn/ArchiveIntermediates/Data Collection Sample/BuildProductsPath/Release-iphoneos" "-F/Users/julian/Documents/Flat Earth/PwC [-] iPhone/PwC-UK-120206" "-F/Users/julian/Documents/Flat Earth/PwC [-] iPhone/PwC-UK-120206/.." "-F/Users/julian/Documents/Flat Earth/PwC [-] iPhone/PwC-UK-120206/Webtrends.framework" -filelist "/Users/julian/Library/Developer/Xcode/DerivedData/PwC_UK-dsueulkkaowyeycupeqjbvsziicn/ArchiveIntermediates/Data Collection Sample/IntermediateBuildFilesPath/PwC UK.build/Release-iphoneos/PwC UK.build/Objects-normal/armv6/PwC UK.LinkFileList" -dead_strip -licucore -ObjC -load_all -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework CoreLocation -framework SystemConfiguration -framework Webtrends -framework CFNetwork -lz -framework MobileCoreServices -framework Security -framework MessageUI -framework AddressBook -framework AddressBookUI -framework MapKit -o "/Users/julian/Library/Developer/Xcode/DerivedData/PwC_UK-dsueulkkaowyeycupeqjbvsziicn/ArchiveIntermediates/Data Collection Sample/IntermediateBuildFilesPath/PwC UK.build/Release-iphoneos/PwC UK.build/Objects-normal/armv6/PwC UK"
ld: library not found for -load_all
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1
My framework search paths are
$(inherited)
"$(SRCROOT)"
"$(SRCROOT)/.."
Any ideas?
I guess you need the -all_load flag not -load_all
I installed MGTwitterEngine in my iPhone app, and followed all the instructions, and now I get the following error:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
The full error text is:
Ld /Users/jason/Documents/iPad/build/Debug-iphonesimulator/FlashCards.app/FlashCards normal i386
cd /Users/jason/Documents/iPad/FlashCards
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/jason/Documents/iPad/build/Debug-iphonesimulator -L/Users/jason/Documents/iPad/FlashCards/Classes -L/Users/jason/Documents/iPad/FlashCards/Classes/SAOAuthTwitterEngine -L/Users/jason/Documents/iPad/FlashCards/Classes -L/Users/jason/Documents/iPad/FlashCards/Classes/Simulator4 -F/Users/jason/Documents/iPad/build/Debug-iphonesimulator -filelist /Users/jason/Documents/iPad/build/FlashCards.build/Debug-iphonesimulator/FlashCards++.build/Objects-normal/i386/FlashCards.LinkFileList -mmacosx-version-min=10.6 -l teEngine -ObjC -all_load -Xlinker -objc_abi_version -Xlinker 2 /Users/jason/Documents/iPad/core-plot/build/Debug-iphonesimulator/libCorePlot-CocoaTouch.a -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -licucore.A -framework QuartzCore -framework SystemConfiguration -framework Security -framework MessageUI -framework CFNetwork -framework AddressBook -framework AddressBookUI -framework AudioToolbox -lteEngine -lteEngine -lOAuth -lxml2.2.7.3 -o /Users/jason/Documents/iPad/build/Debug-iphonesimulator/FlashCards.app/FlashCards
ld: duplicate symbol _EstimateBas64DecodedDataSize in /Users/jason/Documents/iPad/FlashCards/Classes/SAOAuthTwitterEngine/libOAuth.a(Base64Transcoder.o) and /Users/jason/Documents/iPad/build/FlashCards.build/Debug-iphonesimulator/FlashCards++.build/Objects-normal/i386/Base64Transcoder.o
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
Any idea what could be causing it?
Linker found a duplicate symbols for EstimateBas64DecodedDataSize function because in you project you are trying to link against static library libOAuth.a and Base64Transcoder.o which was built from the sources. Both of them contains this symbol and linker doesn't know which one it should pick. It's hard to tell how to resolve this issue in general case, but basically you have to make sure that this symbol is exported by exactly one file from linker's input.
Where did you get this MGTwitterEngine distribution? It will be much easier to solve this issue with actual code.
I almost done my app but suddenly an error appear
The ERROR:
Ld build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/urbantest normal armv7
cd /Users/mbp/Apps/Testing/urbantest
setenv IPHONEOS_DEPLOYMENT_TARGET 4.1
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 armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -L/Users/mbp/Apps/Testing/urbantest/build/Release-iphoneos -L/Users/mbp/Apps/Testing/urbantest/Airship -F/Users/mbp/Apps/Testing/urbantest/build/Release-iphoneos -filelist /Users/mbp/Apps/Testing/urbantest/build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/urbantest.LinkFileList -dead_strip -all_load -weak_library /usr/lib/libSystem.B.dylib -miphoneos-version-min=4.1 -framework Foundation -framework UIKit -framework CoreGraphics -lUAirship-1.0.4 -framework AudioToolbox -framework MessageUI -framework CFNetwork -framework CoreTelephony -framework MobileCoreServices -framework Security -framework StoreKit -framework SystemConfiguration -lsqlite3 -lz -o /Users/mbp/Apps/Testing/urbantest/build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/urbantest
ld: duplicate symbol _OBJC_CLASS_$_UA_ASIDownloadCache in /Users/mbp/Apps/Testing/urbantest/Airship/libUAirship-1.0.4.a(UA_ASIDownloadCache.o) and /Users/mbp/Apps/Testing/urbantest/build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/UA_ASIDownloadCache.o
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Plz help me solve it.
Seem like you are trying to use AirShip library for Push Notification that embed ASIHTTPRequest library. Have you also add by yourself ASIHTTPRequest for network stuff?
If yes the linker found two symbol with the same name (= two definition for the same class) one in AirShip Library and One in ASIHHTPRequest.
You can remove your ASIHTTPRequest and use the one shipped with AirShip library.
I have been banging my head on this for a while now. What is the problem? btw. I am using the Three20 Libraries in my project in case that has anything to do with.
Ld build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ normal armv6
cd /Users/macuser/Dropbox/DFJ/DFJ
setenv IPHONEOS_DEPLOYMENT_TARGET 3.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/g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/macuser/Dropbox/DFJ/DFJ/build/Debug-iphoneos -F/Users/macuser/Dropbox/DFJ/DFJ/build/Debug-iphoneos -F/Users/macuser/Dropbox/DFJ/DFJ/../../../Downloads/gdata-objectivec-client-1.11.0/Source/build/Debug -filelist /Users/macuser/Dropbox/DFJ/DFJ/build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ.LinkFileList -dead_strip -all_load -force_load -miphoneos-version-min=3.2 -framework QuartzCore -framework Foundation -framework UIKit -framework CoreGraphics -lsqlite3.0 -framework MobileCoreServices -lxml2 -framework Security -framework SystemConfiguration -framework OpenAL -framework CoreAudio -framework AudioToolbox -o /Users/macuser/Dropbox/DFJ/DFJ/build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ
ld: file not found: -miphoneos-version-min=3.2
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
You are getting that error because of this part of the ld command line:
-force_load -miphoneos-version-min=3.2
The -force_load option expects to be followed by a filename, but no filename is present so it's taking the next option (-miphoneos-version-min=3.2) and trying to interpret it as a filename.
Take a look at your build settings in XCode to see where that -force_load flag is being specified...