随笔分类 - sqlite3
摘要:【问题描述】利用C编写CGI程序,如何控制sqlite3,进行基本的数据库操作?【简介】需要建立的变量sqlite3 *db;int nrow = 0, ncolumn = 0;char **azResult = NULL;char *zErrMsg = 0; char sql[500];int rc = 0;需要包含的头文件#include <sqlite3.h>备注:详见搭建sqlite3嵌入式开发环境,安装后,会产生一个sqlite3.h的文件。1 打开数据库(open)rc = sqlite3_open("test.db", &db);if (r
阅读全文
摘要:1.安装准备(1) 下载sqlite-3.6.16.tar.gz软件包(2) 执行tar zxvf sqlite-3.6.16.tar.gz解压缩(3) 确保arm-linux交叉编译链能正常使用2 安装x86版本cd sqlite-3.6.16./configuremakemake install安装完成后,执行sqlite3 test.db进行测试。3 安装arm版本(重新解压一份)cd sqlite-3.6.16./configure --host=arm-linux --prefix=/usr/local/sqlitemakemake install注:--prefix指定安装目录【移
阅读全文
摘要:首先编译安装sqlite x86和arm版本,参见【搭建sqlite嵌入式开发环境】(1) x86版gcc -o login.cgi -L/usr/local/lib/ -I/usr/local/include/ -static login.c -lsqlite3 -lpthread(2) arm版arm-linux-gcc -o login.cgi -L/usr/local/sqlite/lib/ -I/usr/local/sqlite/include/ -static login.c -lsqlite3 -lpthread
阅读全文
浙公网安备 33010602011771号