Download sqlitefrom sqlite.orgto Windows server. This is provided in the sqlitedll.zip file, including sqlite3.def.
And
Sqlite3.dll file, of course, you can directly use WIN32API such as loadlibrary to operate the DLL, find the functions contained in it, and use these functions, but generally
The reason for not doing this is very simple: This is too troublesome. Therefore, we usually use the Lib command to generate the Lib for link, and then include the SQLite header file sqlite3.h into the program,
In this way, calling sqlite's API is more convenient. Of course, the sqlite3.h file must be provided from the sqlitesource code (provided in the sqlite-source-3_3_4.zip file.
Follow these steps to use the Lib command of VC ++:
(1.exe set the path of lib.exe in vc98:
D:/mydoc/DB/CAPI> set Path = % PATH %; "D:/program files/Microsoft Visual Studio/vc98/bin"
(2) generate the Lib file of SQLite:
D:/mydoc/DB/CAPI> lib/DEF: sqlite3.def/machine: ix86
Microsoft (r) Library Manager version 6.00.8168 copyright (c)
Microsoft Corp 1992-1998. All Rights Reserved. Creating Library
SQLite. lib and object SQLite. Exp
In this way, the library required to access SQLite in the Win32 program is successfully created and can be used to link the Win32 program.
All preparations for using SQLite have been completed. Now create a Win32 console in msvc6
Application project, copy the SQLite. dll, SQLite. H, and SQLite. Lib files to the project folder, and add the SQLite. h file to the item
Then add the SQLite. Lib file to the object library module in the link of Project setting.