问题
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
- FB + Twitter = working well
- FB + LinkedIn = Working Well
- FB + Twitter + LinkedIn = Not Working and giving error:
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
回答1:
@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...
回答2:
The basic issue is that both our LinkedIn library and Ben Gottlieb's Twitter client include the same OAuthConsumer code. In fact (as the README says) the code in LinkedIn-iPhone was literally copied from his project, with his changes.
That being the case, it should be possible to get this to work by removing our copy of the code (the entire OAuthConsumeriPhoneLib
folder). You may also need to either change the #import
lines in our sources, or your project's header search paths, to get our code to find the OAuthConsumer headers from his copy of the code.
(I acknowledge that this is a pain. But we wanted to be sure that our code would build out of the box, without needing to install other stuff.)
回答3:
'duplicate symbol' means one of your classes is #import
'ing something twice that it shouldn't. If you look carefully, libLinkedInClientLibrary
and libOAuth
both symbolicate the same method '_EstimateBas64EncodedDataSize'. Check your #imports.
来源:https://stackoverflow.com/questions/5259747/iphone-twitter-linkedin-facebook-error-command-developer-platforms-ipho