第一步:下载sqlite源码包,并解压>wget http://www.sqlite.org/sqlite-3.6.16.tar.gz>tar -zxvf sqlite-3.6.16.tar.gz第二步:安装>./configure -disable-tcl>make>make install第三步:编写代码测试>vim sqlite_rw.c
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <sqlite3.h>
-
- int main(int argc, char **argv)
- {
- sqlite3 *db=0;
- int r= sqlite3_open("test.db",&db);
-
- if (r)
- {
- printf("can"t open test.db
");
- }else{
- printf("open db ok
");
- }
-
- sqlite3_close(db);
-
- return 0;
- }
第四步:编译>gcc sqlite_rw.c -o sqlite_rw -lsqlite3Linux下SQLite数据库操作:表的检测,创建,删除。Oracle笔记:RAC Crosschecking相关资讯 sqlite
- Ubuntu 16.04 安装可视化数据库浏 (05月20日)
- iOS 数据库比较:SQLite vs. Core (03月01日)
- 如何在 Ubuntu 15.04 上安装带 (02月09日)
| - 微软推荐通用 Windows 应用开发者 (05月04日)
- SQLite 3.11.0 发布下载 (02月17日)
- SQLite 3.10.2 发布下载 (01月29日)
|
本文评论 查看全部评论 (0)