在ios 5中集成facebook会出错

时间:2013-02-05 07:12:42

标签: iphone ios facebook

我正在创建一个使用facebook登录的应用程序。我正在使用facebook SDK 3.1但是它显示我的错误,我已经将facebook.framwork和resourcefole添加到我的项目中但仍显示错误。

以下是错误报告。

Undefined symbols for architecture i386:
  "_sqlite3_open_v2", referenced from:
      ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_exec", referenced from:
      ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_close", referenced from:
      ___23-[FBCacheIndex dealloc]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_finalize", referenced from:
      _releaseStatement in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_errmsg", referenced from:
      _releaseStatement in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      _initializeStatement in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
      ...
  "_sqlite3_bind_text", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_bind_double", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_bind_int", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_step", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _dropTrimmingTable] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
      ...
  "_sqlite3_prepare_v2", referenced from:
      _initializeStatement in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_reset", referenced from:
      _initializeStatement in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_column_text", referenced from:
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_column_double", referenced from:
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
  "_sqlite3_column_int", referenced from:
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(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 个答案:

答案 0 :(得分:0)

由于sqlite3,你得到了精确定义的符号错误。

在XCode项目的Build Settings中的其他链接器标志中,请确保设置标志 -lsqlite3.0。确保在添加框架Accounts,AdSupport,Social。

旁边设置它