移植SQLite3到ARM开发板

本文介绍了如何将SQLite3移植到ARM开发板,并且详细步骤包括了安装readline库以支持SQLite3控制台的上下键历史记录功能。通过配置和编译,最终使得移植的SQLite3数据库具备了使用readline库的功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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数据库就支持上下键的查看历史记录了。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值