oauthiphone-sdk-3.0linkedin-apifacebook-ios-sdkmgtwitterengine

IPhone + Twitter + LinkedIn + Facebook Error : Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1


I am using MGTwitterEngine oAuth and LinkedIn iOS SDK in my iOS application with facebook-ios-sdk

TwitterEngine : https://github.com/bengottlieb/Twitter-OAuth-iPhone

LinkedInIphone : https://github.com/ResultsDirect/LinkedIn-iPhone

Both integrated well separately, But when I have used both in application then error coming

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

Please help me where I am wrong.

Related post

EDIT

Error Transcript Text File

Build butterfli of project butterfli with configuration Debug

Ld build/Debug-iphonesimulator/butterfli.app/butterfli normal i386
cd /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli
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.1.sdk -L/Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator "-L/Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/Twitter+OAuth/Libraries & Headers" -F/Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator -filelist /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/build/butterfli.build/Debug-iphonesimulator/butterfli.build/Objects-normal/i386/butterfli.LinkFileList -mmacosx-version-min=10.6 -all_load -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -lOAuth -lxml2 /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/Debug-iphonesimulator/libLinkedInClientLibrary.a -o /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/build/Debug-iphonesimulator/butterfli.app/butterfli

ld: duplicate symbol _EstimateBas64EncodedDataSize in /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/LinkedInClientLibrary/build/Debug-iphonesimulator/libLinkedInClientLibrary.a(Base64Transcoder.o) and /Users/pratgupta/Desktop/Settinglinkedin/10_mar_butterfli/Twitter+OAuth/Libraries & Headers/libOAuth.a(Base64Transcoder.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Amit Battan


Solution

  • @amit as i have already said EstimateBas64EncodedDataSize this function is define in 2 source file... 1 definition source file is coming from LinkedIn source and 1 definition is coming from file which is source of twitter... you need to search EstimateBas64EncodedDataSize in your project and remove that one out of two particular package in which these function is defined and most probably it is Base64Encoding related files which are added twice in your project makes compiler confuse on which definition to use for that particular function...