Latest
I. Test 1. download the latest sqlite source code sqlite-autoconf-3070500.tar.gz from the sqlite website http://sqlite.org/download.html. The latest version
I. Test
1. download the latest sqlite source code sqlite-autoconf-3070500.tar.gz from the sqlite website. The latest version is 3.7.5.
2. decompress the source code, enter the source code folder mkdir _ install, configure correctly, and generate the correct Makefile.
The Configure command is as follows:
CC =/usr/local/arm-2007q1/bin/arm-none-linux-gnueabi-gcc CXX =/usr/local/arm-2007q1/bin/arm-none-linux-gnueabi-g ++. /configure -- host = arm-linux -- prefix = 'pwd'/_ install -- disable-tcl
3. Make
4. Make install copy the generated content to the directory specified by./configure-prefix, that is, the _ install Folder.
5. Copy the compiled sqlite3 to the development board File System/bin directory.
Copy the compiled library files in the/lib directory to the/lib directory of the Development Board.
The cross compiler also supports the sqlite3 method:
Copy the compiled library files in the/include directory to the Cross-compiler/include directory.
Copy the compiled library files in the/lib directory to the Cross Compiler/lib directory.
6. Run sqlite3 on the development board. If the following prompt is displayed, the sqlite port is successfully transplanted.
SQLite version 3.7.5
Enter ". help" for instructions
Enter SQL statements terminated with ";"
Sqlite
2. Database Testing;
1. simple command test:
Sqlite> create table film (number, name );
Sqlite> insert into film values (1, 'aaa ');
Sqlite> insert into film values (2, 'bbb ');
Sqlite> select * from film;
1 | aaa
2 | bbb
Sqlite>. quit
2. Cross-compile the sqlite_test application to test sqlite. The application source code and Makefile file are in the compressed package sqlite_test.tar.bz2.
Test command:
./Sqlite_test new. db "create table film (number, name )"
./Sqlite_test test. db "insert"
./Sqlite_test test. db "select * from test. db"