sqlite for vs2017


1. build & install vs2017

2. download sqlite3.dll & sqlite3.def from SQLite official site



3. build sqlite3.lib by below command:

sqlite for vs2017_第1张图片

4. download sqlite3 source to get sqlite3.h:


5. create the new command window project and create the empty c++ file

6. add the lib file into dependency lib setting:


sqlite for vs2017_第2张图片

7. edit c++ file:

// demo_sqlite.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "sqlite3.h"


static int callback(void *NotUsed, int argc, char **argv, char **azColName) {
	int i;
	for (i = 0; i



8. build it and execute it.


9. see the table from database file "test.db"

sqlite for vs2017_第3张图片


10. Done and enjoy.



你可能感兴趣的:(sqlite for vs2017)