天天看點

移植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資料庫就支援上下鍵的檢視曆史記錄了。