我是 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/