2

我在iOS應用程序中使用MGTwitterEngine oAuth和LinkedIn iOS SDK Facebook的IOS-SDKiPhone + Twitter + LinkedIn + Facebook錯誤:Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2失敗,退出代碼1

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

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

兩個集成以及獨立,但是,當我已經從應用程序中使用,則錯誤來

  • FB和Twitter =運作良好
  • FB + LinkedIn =工作井
  • FB和Twitter + LinkedIn =沒有工作,給錯誤:

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

請幫我在哪裏,我錯了。

Related post

編輯

錯誤記錄文本文件

 
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 

阿米特Battan

回答

1

@amit正如我已經說過的那樣EstimateBas64EncodedDataSize這個函數是在2個源文件中定義的...... 1個定義源文件來自LinkedIn源文件,1個定義來自文件,這是twitter的源代碼......您需要在您的項目中搜索EstimateBas64EncodedDataSize,並從其中定義了這些函數的兩個特定軟件包中刪除一個,並且很可能它是在項目中添加了兩次的Base64Encoding相關文件,這使得編譯器會混淆該特定函數使用的定義。 ..

+0

根據Transcript文本文件@mihir .. Base64Transcoder .o在libLinkedInClientLibrary.a和libOAuth.a ..我如何從中刪除...我試圖從MGTwitterEngine(NSData + 64.h/m,NSString + UUID.h/m)中刪除4個文件,但它沒有幫助 – 2011-03-11 05:29:08

+0

這是一個有點棘手的問題......你需要重建libLinkedInClientLibrary.a庫......在該項目中添加了libOAuth.a,並且這些文件包含從linkedIn源中移除的EstimateBas64EncodedDataSize函數......是你明白我的觀點...? – 2011-03-11 05:36:53

+0

是的,我理解這個問題有點...但我不知道我們如何重建libLinkedInClientLibrary.a ......是否可以直接使用文件來代替libLinkedInClientLibrary.a,就像twitter文件一樣 – 2011-03-11 05:40:20

0

'重複的符號' 意味着你的類之一是#import'東西兩次它不應該。如果仔細觀察,libLinkedInClientLibrarylibOAuth都表示相同的方法'_EstimateBas64EncodedDataSize'。檢查你的#imports。

+0

根據成績單文本文件.. Base64Transcoder.o在libLinkedInClientLibrary.a和libOAuth.a中我如何刪除它...我試圖從MGTwitterEngine(NSData + 64.h/m,NSString + UUID.h/m)中刪除4個文件,但它不能幫助 – 2011-03-11 05:29:47

1

基本問題是我們的LinkedIn庫和Ben Gottlieb的Twitter客戶端都包含相同的OAuthConsumer代碼。事實上(正如自述文件所述)LinkedIn-iPhone中的代碼是從他的項目中隨着他的改變而複製的。

既然如此,應該可以通過刪除我們的代碼副本(整個OAuthConsumeriPhoneLib文件夾)來實現此目的。您可能還需要更改我們的源代碼中的#import行或項目的標題搜索路徑,以使我們的代碼從他的代碼副本中找到OAuthConsumer標題。

(我承認這是一個痛苦,但我們希望確保我們的代碼將建立開箱即用,無需安裝其他的東西。)

+0

我做了一件事是......我將linkedin sdk ..的庫文件,並將它的源文件添加到twiiter sdk的oAuth文件中......然後,對於linkedin http://i.imgur.com/cXLXU.png http://i.imgur,它可以正常工作。 com/ntV9G.png ....然後我整合所有的Twitter代碼,然後項目運行好沒有錯誤,但對於Twitter登錄界面它顯示頁面未找到..http://i.imgur.com/8a1ua.png – 2011-03-14 06:22:53

相關問題