在ios中集成facebook时出现sqlite错误

时间:2012-12-13 09:19:24

标签: iphone xcode facebook-login

我正在将Facebook登录集成到我的应用中。通过链接消失 Facebook Developers 但是当我编译时,我得到以下错误:

Undefined symbols for architecture i386:

"_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_bind_text", referenced from:
  -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_close", referenced from:
  ___23-[FBCacheIndex dealloc]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)   "_sqlite3_column_double", referenced from:
  -[FBCacheIndex _createCacheEntityInfo:] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_column_int", referenced from:
  -[FBCacheIndex _createCacheEntityInfo:] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_column_text", referenced from:
  -[FBCacheIndex _createCacheEntityInfo:] in FacebookSDK(FBCacheIndex.o)
  -[FBCacheIndex _trimDatabase] 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 _readEntriesFromDatabase:excludingFragment:] in  FacebookSDK(FBCacheIndex.o)
   -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
   ...   "_sqlite3_exec", referenced from:
   ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)   "_sqlite3_finalize", referenced from:
   _releaseStatement in FacebookSDK(FBCacheIndex.o)   "_sqlite3_open_v2", referenced from:
   ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)   "_sqlite3_prepare_v2", referenced from:
   _initializeStatement in FacebookSDK(FBCacheIndex.o)   "_sqlite3_reset", referenced from:
   _initializeStatement in FacebookSDK(FBCacheIndex.o)   "_sqlite3_step", referenced from:
   -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
   -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
   -[FBCacheIndex _createCacheEntityInfo:] 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)
   ... ld: symbol(s) not found for architecture i386

我还在项目的 Build Settings 标签的其他链接标记中添加了-Isqlite3.0引用,但仍然出现错误。我究竟做错了什么?使用XCode 4.5和iOS6。

1 个答案:

答案 0 :(得分:0)

您还必须将您的应用程序链接到sqlite库或CoreData.framework,具体取决于他们所需的文档。