Apple Mach-O Linker Errors Xcode - iphone

I got this Error from Xcode when trying to run my app on my device.
Ld "/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Intermediates/Store Locator In App.build/Debug-iphoneos/Store Locator In App.build/Objects-normal/armv7s/Store Locator In App" normal armv7s
cd "/Users/admin/Desktop/peboom 5"
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
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 armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Products/Debug-iphoneos "-L/Users/admin/Desktop/peboom 5" -F/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Products/Debug-iphoneos -filelist "/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Intermediates/Store Locator In App.build/Debug-iphoneos/Store Locator In App.build/Objects-normal/armv7s/Store Locator In App.LinkFileList" -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=5.1 -lsqlite3.0 -framework MediaPlayer -framework AudioToolbox -framework AVFoundation -framework SystemConfiguration -framework CFNetwork -framework MobileCoreServices -framework MessageUI -framework CoreLocation -framework QuartzCore -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -lGoogleAnalytics_NoThumb -lGoogleAnalytics -o "/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Intermediates/Store Locator In App.build/Debug-iphoneos/Store Locator In App.build/Objects-normal/armv7s/Store Locator In App"
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/admin/Desktop/peboom 5/libGoogleAnalytics_NoThumb.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The new iPhone 5 processor has a custom ARMv7 core which uses a new architecture called armv7s.
The linker is returning that error because the armv7s slice is missing from the libGoogleAnalytics_NoThumb library you're referencing in your project.
Simply update the GoogleAnalitics SDK to the latest version (1.5.1) you can download here: https://developers.google.com/analytics/devguides/collection/ios/resources

Related

ld: library not found for -lAfariaSLL

Full error message:
Ld/Users/chairman/Library/Developer/Xcode/DerivedData/Field_Final-dsxytmugnwuntcglfimizlbtmegi/Build/Products/Debug-iphonesimulator/Field_Final.app/Field_Final normal i386
cd "/Users/chairman/Documents/Vitthal/NEWFSNOV21_2.3/FSDEVICE2.3 dec6/Field_Final"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Users/chairman/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/chairman/Desktop/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/chairman/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Users/chairman/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/chairman/Library/Developer/Xcode/DerivedData/Field_Final-dsxytmugnwuntcglfimizlbtmegi/Build/Products/Debug-iphonesimulator -F/Users/chairman/Library/Developer/Xcode/DerivedData/Field_Final-dsxytmugnwuntcglfimizlbtmegi/Build/Products/Debug-iphonesimulator -filelist /Users/chairman/Library/Developer/Xcode/DerivedData/Field_Final-dsxytmugnwuntcglfimizlbtmegi/Build/Intermediates/Field_Final.build/Debug-iphonesimulator/Field_Final.build/Objects-normal/i386/Field_Final.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Objc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework MapKit -framework CoreLocation -lz.1.2.5 -lstdc++.6 -licucore.A -framework AddressBook -framework CoreFoundation -framework CFNetwork -framework Security -framework MobileCoreServices -framework SystemConfiguration -framework MessageUI -framework UIKit -framework Foundation -framework CoreGraphics -lAfariaSLL -lMAKit -lsupUltralite -lsupcore -lSUPObj -lclientrt -lDatavault -lMO -o /Users/chairman/Library/Developer/Xcode/DerivedData/Field_Final-dsxytmugnwuntcglfimizlbtmegi/Build/Products/Debug-iphonesimulator/Field_Final.app/Field_Final
ld: library not found for -lAfariaSLL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Go to your target. Under build settings, search for "library search paths". There you should list all the directories where your linked libraries are located.
In respect to SUP, read here about the project settings: http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01213.0225/doc/html/aro1369255660920.html. The link is for v2.2.5, you can select on the left your version and find the document there.
Try this :
Go to targets -> Build phases -> Link Binary With Libraries
Click on + symbol
Press Add Other & add your library
Clean project & than run

ld: framework not found AudioUnit

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>

Error when compiling in the device?

I am getting the below error as "apple mach-o linker error xcode"
Ld "/Users/admin/Library/Developer/Xcode/DerivedData/Voice_-flsfylxijlgswbbqkqwjspmgcska/Build/Intermediates/Voice .build/Debug-iphoneos/Voice .build/Objects-normal/armv6/Voice " normal armv6
cd "/Users/admin/Desktop/Voice "
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
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/llvm-g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/admin/Library/Developer/Xcode/DerivedData/Voice_-flsfylxijlgswbbqkqwjspmgcska/Build/Products/Debug-iphoneos "-L/Users/admin/Desktop/Voice /../Common Files/src" -F/Users/admin/Library/Developer/Xcode/DerivedData/Voice_-flsfylxijlgswbbqkqwjspmgcska/Build/Products/Debug-iphoneos -filelist "/Users/admin/Library/Developer/Xcode/DerivedData/Voice_-flsfylxijlgswbbqkqwjspmgcska/Build/Intermediates/Voice .build/Debug-iphoneos/Voice .build/Objects-normal/armv6/Voice .LinkFileList" -dead_strip -miphoneos-version-min=4.0 -framework AudioUnit -framework OpenAL -framework AVFoundation -framework AudioToolbox -framework CoreAudio -framework Accelerate -framework UIKit -framework Foundation -framework CoreGraphics -lDIRAC_iOS4-fat -o "/Users/admin/Library/Developer/Xcode/DerivedData/Voice_-flsfylxijlgswbbqkqwjspmgcska/Build/Intermediates/Voice .build/Debug-iphoneos/Voice .build/Objects-normal/armv6/Voice "
ld: warning: directory not found for option '-L/Users/admin/Desktop/Voice /../Common Files/src'
ld: framework not found AudioUnit
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
Please help me,
I did not get any solution even I added Audio unit framework it displays same error.
Madan Mohan
Have you tried doing a clean and then setting up your frameworks again?
I think you should add the audio unit framework and create "-L/Users/admin/Desktop/Voice /../Common Files/src" what are you doing with this dir?

Apple Push notification Problem gcc-4.2 failed with exit code 1

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.

Strange error after upgrading to Xcode 3.2.5 ld: file not found: -miphoneos-version-min=3.2

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...