8

我按照以下步骤操作:https ://github.com/ShareKit/ShareKit/wiki/Installing-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)

需要一些关于如何解决这个问题的指导......不胜感激任何帮助......

4

4 回答 4

20

我有同样的问题,使用新的 Facebook SDK 3.0 切换到 ShareKit 库。

您需要添加这些框架和库来解决错误:

Social.framework
AdSupport.framework
Accounts.framework
libsqlite3.dylib
于 2012-11-19T19:54:53.383 回答
3

我不认为删除其他链接器标志是一个好主意。

请参阅静态库中链接objective-c类别http://www.cocoanetics.com/2011/12/sub-projects-in-xcode/

新的 facebook SDK 需要几个框架,不要忘记将它们添加到您的项目中:

  • 社会框架
  • 帐户框架
  • adsupport.framework
  • libsqlite3.dylib
于 2012-11-19T07:54:46.740 回答
2

只需添加

libsqlite3.dylib

来自 Xcode 中项目的链接框架和库

于 2012-12-10T19:46:37.310 回答
0

这最终对我有用: http: //t2526.codeinpro.us/q/51501c3fe8432c042610dc68

从 Xcode 的构建设置中的其他链接器标志中删除 -ObjC 和 -all_load。

于 2013-10-03T18:46:48.257 回答