移植SQLite3到ARM开发板

1、首先安装 readline-6.2.tar.gz 库到文件件系统

这是为支持sqlite 控制台界面程序时的上下键选择历史记录的功能

解压之后 ,进入目录 :

readline-6.2#./configure --host=arm-none-linux-gnueabi -prefix=/root/targetfs/usr

///注意 安裝目錄是指/root/targetfs/usr 而不是指/root/targetfs/usr/lib

make && make install

2、下载 sqlite-autoconf-3071300.tar.gz

解压后,进入目录。

sqlite-autoconf-3071300#
./configure --host=arm-none-linux-gnueabi -prefix=/root/targetfs/usr CFLAGS=-I/root/targetfs/usr/include LDFLAGS=-L/root/targetfs/usr/lib

其中“CFLAGS=-I/root/targetfs/usr/include LDFLAGS=-L/root/targetfs/usr/lib” 是引用上述交叉編譯的readline庫。
---配置後的結果如下--------
.........
hecking for a thread-safe mkdir -p... /bin/mkdir -p
checking for fdatasync... yes
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for library containing tgetent... -lncurses
checking for library containing readline... -lreadline
checking for readline... yes
------------------------------------------>注意這一行
checking for library containing pthread_create... -lpthread
checking for library containing dlopen... -ldl
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfilng deO

然后 make && make install

这样编译出来的sqlite3数据库支持上下键的查看历史记录了。

相关文章

SQLite架构简单,又有Json计算能力,有时会承担Json文件/RES...
使用Python操作内置数据库SQLite以及MySQL数据库。
破解微信数据库密码,用python导出微信聊天记录
(Unity)SQLite 是一个软件库,实现了自给自足的、无服务器...
安卓开发,利用SQLite实现登陆注册功能