2012-11-18 55 views
8

我按照這個步驟:https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit來安裝Sharekit。但我仍然面臨一些錯誤。我不知道如何解決這個問題。讓Sharekit工作

的錯誤:

Undefined symbols for architecture i386: 
    "_ACAccountTypeIdentifierFacebook", referenced from: 
     +[FBSession renewSystemAuthorization] in libShareKit.a(FBSession.o) 
    "_ACFacebookAppIdKey", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) 
    "_ACFacebookAudienceEveryone", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) 
    "_ACFacebookAudienceFriends", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) 
    "_ACFacebookAudienceKey", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) 
    "_ACFacebookAudienceOnlyMe", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) 
    "_ACFacebookPermissionsKey", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in libShareKit.a(FBSession.o) 
    "_OBJC_CLASS_$_ACAccountStore", referenced from: 
     objc-class-ref in libShareKit.a(FBSession.o) 
    "_OBJC_CLASS_$_ASIdentifierManager", referenced from: 
     objc-class-ref in libShareKit.a(FBSettings.o) 
    "_OBJC_CLASS_$_SLComposeViewController", referenced from: 
     objc-class-ref in libShareKit.a(FBNativeDialogs.o) 
    "_SLServiceTypeFacebook", referenced from: 
     +[FBNativeDialogs composeViewControllerWithSession:handler:] in libShareKit.a(FBNativeDialogs.o) 
    "_sqlite3_bind_double", referenced from: 
     -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_bind_int", referenced from: 
     -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_bind_text", referenced from: 
     -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _readEntryFromDatabase:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _removeEntryFromDatabaseForKey:] in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_close", referenced from: 
     ___23-[FBCacheIndex dealloc]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_column_double", referenced from: 
     -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_column_int", referenced from: 
     -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _fetchCurrentDiskUsage] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_column_text", referenced from: 
     -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_errmsg", referenced from: 
     ___23-[FBCacheIndex dealloc]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) 
     _releaseStatement in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) 
     _initializeStatement in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _readEntryFromDatabase:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in libShareKit.a(FBCacheIndex.o) 
     ... 
    "_sqlite3_exec", referenced from: 
     ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_finalize", referenced from: 
     _releaseStatement in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_open_v2", referenced from: 
     ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_prepare_v2", referenced from: 
     _initializeStatement in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_reset", referenced from: 
     _initializeStatement in libShareKit.a(FBCacheIndex.o) 
    "_sqlite3_step", referenced from: 
     -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _writeEntryInDatabase:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _createCacheEntityInfo:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _fetchCurrentDiskUsage] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _removeEntryFromDatabaseForKey:] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _dropTrimmingTable] in libShareKit.a(FBCacheIndex.o) 
     -[FBCacheIndex _trimDatabase] in libShareKit.a(FBCacheIndex.o) 
     ... 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

需要就如何解決這個...希望得到任何幫助一些指導...

+1

我得到類似的錯誤,但與架構armv7。獲得相同的_OBJC_CLASS _ $ _ ACAccountStore錯誤+像你一樣的其他一堆sqlite錯誤。如果我找到解決方案,我會嘗試在此處發佈。希望我們可以得出這個想法。 – Gowiem

+0

我通過刪除本文提出的「-ObjC -all_load」修復了鏈接錯誤:[Sharekit Issue#408](https://github.com/ShareKit/ShareKit/issues/408) – Gowiem

+0

將它添加爲解決方案... – laksh

回答

20

我有同樣的問題,用新的Facebook SDK 3.0切換到ShareKit庫。

您需要添加這些框架和庫來解決錯誤:

Social.framework 
AdSupport.framework 
Accounts.framework 
libsqlite3.dylib 
+4

如果爲iOS 5.X構建這些框架應該標記爲可選正確的?由於他們只需要新的Facebook SDK? – Gowiem

+0

是的,他們應該。順便說一句,這個答案有效,並且比接受的更好,因爲它不會強制你去除其他框架所需的宏。 – csotiriou

+0

非常感謝 – lomec

2

只需添加

libsqlite3.dylib

從鏈接框架和項目庫在Xcode