Create sqlite. lib and access the sqlite database in

Source: Internet
Author: User
The functions file contains the sqlite3.def and sqlite3.dll files. Of course, you can directly use WIN32API such as LoadLibrary to operate the dll, find the functions contained in the dll, and use these functions, however, this is generally not the case because it is too troublesome.

The functions file contains the sqlite3.def and sqlite3.dll files. Of course, you can directly use WIN32API such as LoadLibrary to operate the dll, find the functions contained in the dll, and use these functions, however, this is generally not the case because it is too troublesome.

The functions file contains the sqlite3.def and sqlite3.dll files. Of course, you can directly use WIN32API such as LoadLibrary to operate the dll, find the functions contained in the dll, and use these functions, however, this is generally not the case because it is very simple: This is too troublesome. Therefore, we usually use the LIB command to generate the lib for the 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 librarySQLITE. 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. create a Win32 ConsoleApplication project in MSVC6 and. dll, sqlite. h and sqlite. copy the lib file to the project folder and copy sqlite. add the H file to the Project, and then add sqlite to the object library module in the Link of the Project Setting. lib file.

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.