iPhone +推特 +领英 + Facebook 错误:命令 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 失败,退出代码 1

发布于 2024-10-21 03:06:29 字数 2803 浏览 5 评论 0原文

我在我的 iOS 应用程序中使用 MGTwitterEngine oAuth 和 LinkedIn iOS SDK 以及 facebook-ios-sdk

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

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

两者分别集成得很好,但是当我在应用程序中使用两者时,就会出现错误

  • FB + Twitter = 工作良好
  • FB + LinkedIn = 工作良好
  • FB + Twitter + LinkedIn = 不工作给出错误:

命令 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 失败,退出代码为 1

请帮助我解决我的错误。

相关帖子

编辑

< em>错误记录文本文件

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情未る 2024-10-28 03:06:29

@amit 正如我已经说过的 EstimateBas64EncodedDataSize 这个函数在 2 个源文件中定义... 1 个定义源文件来自 LinkedIn 源文件,1 个定义来自 Twitter 源文件...您需要搜索 EstimateBas64EncodedDataSize 在您的项目中,并删除定义这些函数的两个特定包中的一个,并且很可能是 Base64Encoding 相关文件,这些文件在您的项目中添加了两次,使编译器混淆该特定函数使用哪个定义...

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

情徒 2024-10-28 03:06:29

基本问题是我们的 LinkedIn 库和 Ben Gottlieb 的 Twitter 客户端都包含相同的 OAuthConsumer 代码。事实上(正如 README 所说) LinkedIn-iPhone 中的代码实际上是从他的项目中复制的,随着他的改变。

既然如此,应该可以通过删除代码副本(整个 OAuthConsumeriPhoneLib 文件夹)来使其正常工作。您可能还需要更改源代码中的 #import 行或项目的标头搜索路径,以使我们的代码从其代码副本中查找 OAuthConsumer 标头。

(我承认这很痛苦。但我们希望确保我们的代码可以开箱即用,无需安装其他东西。)

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

口干舌燥 2024-10-28 03:06:29

“重复符号”意味着您的某个类#import两次执行了不应执行的操作。如果仔细观察,libLinkedInClientLibrarylibOAuth 都表示相同的方法“_EstimateBas64EncodedDataSize”。检查你的#imports。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文