Create SQLite. lib and access the SQLite database in

Source: Internet
Author: User

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.

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.