xcode sqlite3 libsqlite.dylib [英] xcode sqlite3 libsqlite.dylib

查看:232
本文介绍了xcode sqlite3 libsqlite.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



ld警告:


iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator3.0.sdk / usr / lib / libsqlite3.dylib,
文件不是必需的架构


ld警告:



/install/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3。 0.sdk / usr / lib / libsqlite3.0.dylib,
文件不是必需的架构未定义
符号:_ sqlite3_open,引用自:LiteSqlViewController中的[LiteSqlViewController
openDB]。 o_sqlite3_close,引用自:
- LiteSqlViewController.o中的[LiteSqlViewController openDB]


ld:



>

没有找到符号collect2:ld返回1退出状态
_sqlite3_open,引用自: - LiteSqlViewController.o中的[LiteSqlViewController openDB] _sqlite3_close,引用
来自: - LiteSqlViewController.o中的[LiteSqlViewController openDB]


ld:



没有找到

符号collect2:ld返回1退出状态生成失败
(2个错误)


< blockquote>

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



命令的结果:


文件/usr/lib/libsqlite3.dylib:/usr/lib/libsqlite3.dylib:Mach-O
通用二进制有4个架构/usr/lib/libsqlite3.dylib(用于
架构ppc7400):Mach-O动态链接共享库ppc
/usr/lib/libsqlite3.dylib(用于架构ppc64):Mach-O 64位
动态链接共享库ppc64 /usr/lib/libsqlite3.dylib(用于
架构i386):Mach-O动态链接共享库i386
/usr/lib/libsqlite3.dylib (对于架构x86_64):Mach-O 64位
动态链接共享库x86_64。



解决方案

在PPC Mac上使用iPhone模拟器似乎并不太直接。发出命令文件与您获得的第一个错误的路径(紧跟在第一个 ld warning:之后)。请查看此相关问题,可能这些步骤有帮助。






旧答案: b
$ b

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



4这可以如屏幕截图所示:按加号,然后添加 libsqlite3.dylib 。然后,您可以将库拖动到链接的Frameworks文件夹中。 (屏幕截图显示的是Mac OS X应用程序,iOS应用程序也是如此)




I have an error in project, but I d'nt know were is the problem. this is my error after compilation.

ld warning:

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

ld warning:

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)

I use OSX 10.5.8 xcode 3.1.2 iphone simulator 2.2.1 Architecture PPC

the result of command:

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.

解决方案

It doesn't seem to be too straightforward to use the iPhone Simulator on PPC Macs. Issue the command file with the path in the first error you get (right after the first ld warning:). Check out this related question, maybe these steps help.


Old answer:

Did you link libsqlite3.dylib in your project?

In Xcode 4 this can be done like shown in the screenshot: Press the plus sign and add libsqlite3.dylib. Afterwards, you can drag the library into the Linked Frameworks folder. (The screenshot shows a Mac OS X application, it's the same for iOS applications.)

这篇关于xcode sqlite3 libsqlite.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆