Welcome 微信登录

首页 / 数据库 / MySQL / Linux 下的 SQLite3 的安装

第一步:下载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
  1. #include <stdio.h>   
  2. #include <stdlib.h>   
  3. #include <string.h>   
  4. #include <sqlite3.h>   
  5.   
  6. int main(int argc, char **argv)  
  7. {  
  8.         sqlite3 *db=0;  
  9.         int  r= sqlite3_open("test.db",&db);  
  10.   
  11.         if (r)  
  12.         {  
  13.                 printf("can"t open test.db ");  
  14.         }else{  
  15.                 printf("open db ok ");  
  16.         }  
  17.   
  18.         sqlite3_close(db);  
  19.   
  20.         return 0;  
  21. }  
第四步:编译>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)
表情: 姓名: 字数