gpt4 book ai didi

iphone - xcode sqlite3 libsqlite.dylib

转载 作者:行者123 更新时间:2023-12-03 16:49:28 25 4
gpt4 key购买 nike

我的项目出现错误,但我不知道问题所在。这是我编译后的错误。

ld警告:

in /install/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib/libsqlite3.dylib, file is not of required architecture

ld警告:

in /install/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib/libsqlite3.0.dylib, file is not of required architecture Undefined symbols:"_sqlite3_open", referenced from: -[LiteSqlViewController openDB] in LiteSqlViewController.o "_sqlite3_close", referenced from: -[LiteSqlViewController openDB] in LiteSqlViewController.o

ld:

symbol(s) not found collect2: ld returned 1 exit status _sqlite3_open", referenced from:-[LiteSqlViewController openDB] in LiteSqlViewController.o "_sqlite3_close", referenced from:-[LiteSqlViewController openDB] in LiteSqlViewController.o

ld:

symbol(s) not found collect2: ld returned 1 exit status Build failed (2 errors)

我使用 OSX 10.5.8 xcode 3.1.2 iphone 模拟器 2.2.1 架构 PPC

命令结果:

file /usr/lib/libsqlite3.dylib : /usr/lib/libsqlite3.dylib: Mach-O universal binary with 4 architectures /usr/lib/libsqlite3.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc /usr/lib/libsqlite3.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 /usr/lib/libsqlite3.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /usr/lib/libsqlite3.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64.

最佳答案

在 PPC Mac 上使用 iPhone 模拟器似乎不太简单。使用您收到的第一个错误中的路径发出命令 file(就在第一个 ld 警告:之后)。查看this related question ,也许这些步骤有帮助。

<小时/>

旧答案:

您是否在项目中链接了libsqlite3.dylib

在 Xcode 4 中,可以像屏幕截图中所示那样完成:按加号并添加 libsqlite3.dylib。然后,您可以将库拖到 Linked Frameworks 文件夹中。 (屏幕截图显示的是 Mac OS X 应用程序,iOS 应用程序也是如此。)

Xcode 4 Screenshot

关于iphone - xcode sqlite3 libsqlite.dylib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5392649/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com