用于使用与libsqlite3.dylib Xcode的FMDB 7 ios9 i386硬件架构未定

2019-10-23 19:38发布

我使用的Xcode 7和iOS 9创建一个简单的应用程序,它保存数据,并使用sqllite3进行检索。 但是我收到以下错误消息,同时建立使用libsqlite3.dylib库和FMDB从GitHub检索到的应用程序。

Undefined symbols for architecture i386:
  "_sqlite3_bind_blob", referenced from:
      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
  "_sqlite3_bind_double", referenced from:
      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
  "_sqlite3_bind_int", referenced from:
      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
  "_sqlite3_bind_int64", referenced from:
      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
  "_sqlite3_bind_null", referenced from:
      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
  "_sqlite3_bind_parameter_count", referenced from:
      -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
  "_sqlite3_bind_parameter_index", referenced from:
      -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
  "_sqlite3_bind_text", referenced from:
      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
  "_sqlite3_busy_handler", referenced from:
      -[FMDatabase setMaxBusyRetryTimeInterval:] in FMDatabase.o
  "_sqlite3_changes", referenced from:
      -[FMDatabase changes] in FMDatabase.o
  "_sqlite3_close", referenced from:
      -[FMDatabase close] in FMDatabase.o
  "_sqlite3_column_blob", referenced from:
      -[FMResultSet dataForColumnIndex:] in FMResultSet.o
      -[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
  "_sqlite3_column_bytes", referenced from:
      -[FMResultSet dataForColumnIndex:] in FMResultSet.o
      -[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
  "_sqlite3_column_count", referenced from:
      -[FMResultSet columnCount] in FMResultSet.o
      -[FMResultSet columnNameToIndexMap] in FMResultSet.o
      -[FMResultSet kvcMagic:] in FMResultSet.o
      -[FMResultSet resultDictionary] in FMResultSet.o
  "_sqlite3_column_double", referenced from:

我开车四处寻找但没有找到任何解决办法后自己疯了。 请建议。 提前致谢。

Answer 1:

检查时是否libsqlite3.dylib在链接二进制添加在构建阶段库部分



Answer 2:

它看起来并不像你的项目链接到的libsqlite3。 仔细检查它的链接反对它,如果它是,也许它添加为链接器标志。



文章来源: Undefined symbols for architecture i386 using libsqlite3.dylib with FMDB Xcode 7 ios9