1, download Sqlite3 Source: http://www.sqlite.org/download.html
Mainly Sqlite-amalgamation-xxxxxxx.zip, Sqlite-dll-win32-x86-xxxxxxx.zip, Sqlite-dll-win32-x64-xxxxxxx.zip
Dynamic Library Compilation:
PS: If there are no special requirements, you can directly use the DLL in the downloaded Sqlite-dll-*********.zip, if you do not rest assured that you compile.
1. Create Win32 project using VS2010, then select DLL and Empty project, vc6-vs2015 support under normal circumstances
2, the sqlite3.c, Sqlite3.h, sqlite3ext.h, sqlite3.def Copy to the project source file directory, the first 3 files are located in a zip, the next file is located in the last 2 zip, with which to see your target environment.
3, then through the project's resource manager to add the above 4 files to the project
4, modify the project configuration, in the configuration properties-->c/c++--> preprocessor---preprocessor definition, join
Sqlite_enable_rtree
Sqlite_enable_column_metadata
5, modify the project configuration, in the configuration Properties---the linker--and the module definition file to join the Sqlite3.def, and then compile.
Static Library Compilation:
1, create the Win32 project with VS2010, then select the static Library, remove the precompiled header, under normal circumstances vc6-vs2015 support
2, the sqlite3.c, Sqlite3.h, sqlite3ext.h, sqlite3.def Copy to the project source file directory, the first 3 files are located in a zip, the next file is located in the last 2 zip, with which to see your target environment.
3, then through the project's resource manager to add the above 4 files to the project
4, modify the project configuration, in the configuration properties-->c/c++--> preprocessor---preprocessor definition, join
Sqlite_enable_rtree
Sqlite_enable_column_metadata
5, modify the project configuration, in the configuration Properties---the linker--and the module definition file to join the Sqlite3.def, and then compile.
Use:
Introduce the Sqlite3.h header file and then link the dynamic library or the static library.
Note, however, that compiling the SQLITE3 project is consistent with the runtime of the Sqlite3 project, otherwise error LNK2005: a redefinition problem
Set the path as follows: Engineering--Properties---Configuration Properties-->c/c++--> code generation--run library
Compilation of sqlite3 static libraries and dynamic libraries under windows