The official download of sqlitesqlite in VC only provides us with a sqlite3.dll and a sqlite3.def file, followed by a bunch of source code, and does not provide lib files for VC ++ 6.0, SLN or vcproj files. You can use the sqlite3.def file to generate the file as follows:
1. Create a slaveCodeProject created in, and the code path is set to SQLiteSource codePath
2. Copy sqlite3.h (which can be obtained from the source code directory) to C: \ Program Files \ Microsoft Visual Studio \ vc98 \ include directory. Compilation is successful, but the link is incorrect, because there is no lib file
3. Start a Program and enter the installation directory c of VC: \ Program Files \ Microsoft Visual Studio \ vc98 \ bin. There Is A lib.exe file under this directory. You can use it to generate the sqlite3.lib file and put the sqlite3.def file in the same directory or absolute path, then enter the following command in the command line:
lib/machine: ix86/DEF: sqlite3.def
This command generates two files: sqlite3.lib and sqlite3.exp
, if you cannot find the mspdb60.dll file, you can copy it from another directory to the bin directory
4. Copy the generated sqlite3.lib to the lib directory and copy sqlite3.dll to C: \ winnt \ system32 directory
5. Add sqlite3.lib to the Project LINK, project-> Settings, link tab, after the object/library modules is added to sqlite3.lib, the following program can compile the link and run