SQLite3 dynamic Library, Static library compilation

Source: Internet
Author: User
Tags sqlite win32

Resource Preparation

1, download SQLite3 source code, for https://www.sqlite.org/download.html. Download Sqlite-amalgamation-3200000.zip and Sqlite-dll-win32-x86-3200000.zip, unzip separately.

Dynamic Library Compilation

1. Create Win32 project with VS2012, name Sqlite3, and select DLL and Empty project

2, the SHELL.C, sqlite3.c, Sqlite3.h, sqlite3ext.h, sqlite3.def Copy to the project source file directory, the first 4 files are located in a zip, the latter file is located in the last 2 zip

3, through the project's resource manager to add the above 4 files to the project

4, modify the project configuration, in the configuration properties-->c/c++--> preprocessor---preprocessor definition, add two preprocessing macros

Sqlite_enable_rtree

Sqlite_enable_column_metadata

5, modify the project configuration, in the configuration Properties--the linker--and input-module definition file to join Sqlite3.def

6, compile can.

Static Library Compilation

The compilation of the static library is basically the same as the compilation process of the dynamic library, just a little bit different when the project is created, when the WIN32 project is created, the static library is selected, then the precompiled header is canceled, and all subsequent steps are the same as the precompiled Dynamic library.

SQLite3 dynamic Library, Static library compilation

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.