iphone - MGTwitterEngine 抛出错误 : g++-4. 2 失败,退出代码为 1

标签 iphone ios gcc twitter mgtwitterengine

我在我的 iPhone 应用程序中安装了 MGTwitterEngine,并按照所有说明操作,现在我收到以下错误:

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

完整的错误文本是:

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

知道是什么原因造成的吗?

最佳答案

链接器发现了 EstimateBas64DecodedDataSize 函数的重复符号,因为在您的项目中您正尝试链接静态库 libOAuth.aBase64Transcoder.o 它是从源代码构建的。它们都包含此符号,链接器不知道应该选择哪一个。在一般情况下很难说出如何解决这个问题,但基本上你必须确保这个符号是由链接器输入的一个文件导出的。

您从哪里获得这个 MGTwitterEngine 发行版?用实际代码解决这个问题会容易得多。

关于iphone - MGTwitterEngine 抛出错误 : g++-4. 2 失败,退出代码为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5226921/

相关文章:

ios - 从半色调滤镜上去除黑白效果

iphone - 如何限制 Landscape 中的 modalViewController?

gcc - 无法将 portaudio 库链接为静态库

C++ OpenMP 和 gcc 4.8.1 - 并行化循环时的性能问题

c - 编写将 int 返回给 Fortran 的 C 函数

iphone - 后退导航按钮未显示在推送 View Controller 中

iphone - 自 iOS 4.0 以来,存在哪些选项可将视频嵌入 View ?

iOS:LaunchScreen.storyboard 上的新图像未显示正在更新的应用程序

ios - 直到第二次加载时 View 才会更新

ios - 使用 JSONKIT 序列化 NSNumber 时出错