Linux环境移植编译SQLite3

2019-07-13 04:25发布

 Linux环境
一 下载源码 官网下载:http://www.sqlite.org/download.html
二 编译 1 解压 下载完成之后一般会在当前用户的“下载”目录中,首先cd到下载目录,然后创建一个文件件,用来放解压之后的文件: [plain] view plain copy print?
  1. mkdir sqlite  
mkdir sqlite
然后cd到新建的目录中,运行如下命令解压 [plain] view plain copy print?
  1. unzip ../sqlite-amalgamation-201408081749.zip  
unzip ../sqlite-amalgamation-201408081749.zip 解压之后会有四个文件:shell.c,sqlite3.c,sqlite3.h,sqlite3ext.h
2 编译 执行命令: [plain] view plain copy print?
  1. gcc *.c -o sqlite3 -lpthread -ldl  
gcc *.c -o sqlite3 -lpthread -ldl
执行完之后将会生成一个sqlite3可执行文件