0

我正在创建一个使用 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)
4

1 回答 1

0

由于 sqlite3,您会收到定义符号错误。

在 XCode 项目的构建设置中的其他链接器标志中,确保设置标志 -lsqlite3.0。确保在添加框架帐户、广告支持、社交旁边设置它。

于 2013-02-05T07:43:05.290 回答