资源下载
官网资源:SQLite Download Page

1、sqlite.h
|---------------------------------------------------------------------------------------------------------------------------------------------|
| sqlite-amalgamation-3450000.zip (2.60 MiB) |

2、sqlite3.def,sqlite3.dll
|------------------------------------------------------------------------------------------------------------------------------------------|
| sqlite-dll-win-x64-3450000.zip (1.25 MiB) |

3、 win10下安装sqlite3所需要文件
sqlite-tools-win-x64-3450000.ziphttps://www.sqlite.org/2024/sqlite-tools-win-x64-3450000.zip

安装Sqlite3的环境
将所有文件放在某一路径下的文件夹: 我就放在: D:\SoftSetup\Sqlite3
1、首先配置环境变量:
此电脑--》系统属性--》高级系统设置--》环境变量--》系统变量(选中Path)--》编辑--》新建--》输入路径 我的是:D:\SoftSetup\Sqlite3。之后确定,就完成环境的配置





2、验证环境:
以下3选1,以任何一种方式打开命令提示符窗口
(1)win+R: 输入 cmd
(2)在当前目录:D:\SoftSetup\Sqlite3, 直接输入cmd,回车
(3)win + S 打开界面,输入cmd,即可打开窗口
输入:sqlite3 如果成功会出现如下界面

最后我的路径下的文件如下:

通过sqlite3.dll 和sqlite.h 生成 sqlite3.lib
通过Visual Stdio的命令行环境,来进行操作;首先启动**Command Prompt,**找到VisualStdio的安装路径,进入Command7下的tools路径,输入cmd + 回车;进入如下界面。
如:我的是路径是:D:\SoftSetup\VisualStdio2022\Common7\Tools
首先输入: VsDevCmd.bat -arch=amd64 来启动Visual StdioCommand Prompt
然后回到,sqlite3所在的文件夹:D:\SoftSetup\Sqlite3
输入 命令: lib /def:sqlite3.def /machine:ix64
D:\SoftSetup\Sqlite3目录下就可以生成sqlite3.lib 文件
项目中的配置细节
在已经创建完成的QT项目中的.pro文件中加入如下两句:
bashINCLUDEPATH += "D:\SoftSetup\Sqlite3" LIBS += -L"D:\SoftSetup\Sqlite3" -lsqlite3
即可在项目中使用 "sqlite3.h" 库