ios - 引用架构 x86_64 : "_sqlite3_close", 的 undefined symbol

标签 ios sqlite linker-errors

我是 Objective-C 的新手,当我从 xcode 中的 sqlite3 调用添加时收到此错误。有人知道我可以做些什么来修复这个错误吗?

Undefined symbols for architecture x86_64:
  "_sqlite3_close", referenced from:
      -[InAppUtils get:] in libInAppUtils.a(InAppUtils.o)
  "_sqlite3_exec", referenced from:
      -[InAppUtils get:] in libInAppUtils.a(InAppUtils.o)
  "_sqlite3_open", referenced from:
      -[InAppUtils get:] in libInAppUtils.a(InAppUtils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我尝试添加 libsqlite3.dylib 库,但在我的系统上找不到它。是必须的吗?如果是这样,我该如何找到它?

最佳答案

看起来libsqlite3.tbd是新的libsqlite3.dylib。我添加了它,一切正常。

转到“构建阶段”选项卡。展开“将二进制文件与库链接”部分。单击+图标。搜索“sqlite”。添加库

关于ios - 引用架构 x86_64 : "_sqlite3_close", 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33028185/

相关文章:

ios - 如果 iOS sqlite 中不存在数据库,则导入

python - 我的 sqlite 行之一包含我的列名称。如何选择删除

ios - Xcode 8 更新后,通过桥接 header 的 .c 文件不起作用

ios - 呈现 View 时,VoiceOver 不会始终关注 UILabel

ios - cgcontext 旋转矩形

ios - 如何使用 .fetch 函数在 react-native 中使 API 调用与 IPV6 兼容?

c# - 无法更新List1 : it has no PK

objective-c - XCode 4,签名无效 (-19011)

c++ - 链接器 2001 错误和成员变量的未定义标识符

c++ - 为什么这个 "undefined extern variable"不会导致 C++17 中的链接器错误?