我正在尝试使用sqlite3函数调用数据库的数据库访问类,但是却遇到了所有这些错误,如果有人之前经历过此类错误,或者是否有任何想法,我就很痛苦为什么它们会发生。

Undefined symbols:
  "_sqlite3_finalize", referenced from:
      -[DBAccess getAllMakes] in DBAccess.o
  "_sqlite3_errmsg", referenced from:
      -[DBAccess initalizeDatabase] in DBAccess.o
      -[DBAccess closeDatabase] in DBAccess.o
  "_sqlite3_step", referenced from:
      -[DBAccess getAllMakes] in DBAccess.o
  "_sqlite3_column_text", referenced from:
      -[DBAccess getAllMakes] in DBAccess.o
  "_sqlite3_prepare_v2", referenced from:
      -[DBAccess getAllMakes] in DBAccess.o
  "_sqlite3_open", referenced from:
      -[DBAccess initalizeDatabase] in DBAccess.o
  "_sqlite3_close", referenced from:
      -[DBAccess initalizeDatabase] in DBAccess.o
      -[DBAccess closeDatabase] in DBAccess.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

最佳答案

将框架libsqlite3.0.dylib添加到框架中的项目中

10-08 13:12