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.
Related
I'm trying to create a project utilizing both MailChimp and ShareKit code.
I believe I'm dynamically linking to them both by dragging their Xcode project files into my new project, then dragging and dropping the desired groups.
The problem I'm having now is that they both use a file name called SBJSonParser from their JSON libraries.
I'm getting an error that says:
ld: duplicate symbol _OBJC_CLASS_$_SBJsonParser
I don't want / don't think renaming the files would be sufficient, as there are quite a few more filenames they have in common. Does anyone have ideas on what to do? Thanks
Full error:
Ld /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator/PolaroidMe.app/PolaroidMe normal i386
cd /Users/user/Documents/PolaroidMe
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/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator -F/Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator -filelist /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/PolaroidMe.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework CoreLocation -framework Twitter -framework CFNetwork -framework SystemConfiguration -framework Security -framework MessageUI -framework AVFoundation -framework MobileCoreServices -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator/PolaroidMe.app/PolaroidMe
ld: duplicate symbol _OBJC_CLASS_$_SBJsonParser in /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-7C0C46CE63D45CA3.o and /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-227BA1E6AFC01E91.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
ld: duplicate symbol _OBJC_CLASS_$_SBJsonParser in /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-7C0C46CE63D45CA3.o and /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-227BA1E6AFC01E91.o for architecture i386
SBJSON is a library, it only needs to be inside your project once. Just delete one of them.
I want to login with facebook account in my application. For that i read developers.facebook.com documentation. I have installed everything. When i put FBConnect in my application, then i get this error:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Ld build/Debug-iphonesimulator/RunnoNavTest.app/RunnoNavTest normal i386
cd "/Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest"
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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk "-L/Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/Debug-iphonesimulator" "-F/Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/Debug-iphonesimulator" -filelist "/Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/RunnoNavTest.build/Debug-iphonesimulator/RunnoNavTest.build/Objects-normal/i386/RunnoNavTest.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreLocation -framework MediaPlayer -framework MapKit -lz.1.2.3 -framework CFNetwork -framework MobileCoreServices -framework SystemConfiguration -o "/Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/Debug-iphonesimulator/RunnoNavTest.app/RunnoNavTest"
ld: duplicate symbol _SBJSONErrorDomain in /Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/RunnoNavTest.build/Debug-iphonesimulator/RunnoNavTest.build/Objects-normal/i386/SBJsonBase-8058DE1040F45B54.o and /Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/RunnoNavTest.build/Debug-iphonesimulator/RunnoNavTest.build/Objects-normal/i386/SBJsonBase-4E4B4560D6FF6850.o
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
ld: duplicate symbol _SBJSONErrorDomain in /Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/RunnoNavTest.build/Debug-iphonesimulator/RunnoNavTest.build/Objects-normal/i386/SBJsonBase-8058DE1040F45B54.o and /Users/arashsaeidihaghi/Documents/Mahmood/iPhone Apps/RunnoNavTest/build/RunnoNavTest.build/Debug-iphonesimulator/RunnoNavTest.build/Objects-normal/i386/SBJsonBase-4E4B4560D6FF6850.o
When i remove that FBConnect, then it again works fine. That FBConnect has a JSON folder and my application also has a JSON folder. But files in both folder have different names. How can i remove this error and make it work? Thanks in advance.
I think the file in the JSON folder is a duplicate.
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?
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...