Compile SQLite in VC

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.