In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Extracted from: http://www.sqlite.org/howtocompile.html
Amalgamation Versus Individual Source Files merges with a single source file
SQLite is a source library that conforms to the ANSI-C specification. Must be compiled into machine code before it can be used. The purpose of this article is to guide how to compile SQLite in different ways.
This article will not teach you how to compile SQLite (step-by-steprecipe step-by-step recipes). In view of the different development platforms, it is difficult to provide a unified specification. Instead, this article only describes and explains the fundamentals of SQLite compilation.
Some examples are provided below, which contain general compilation commands to help application developers quickly develop their own custom compilers.
Many examples are provided below, including many typical compilation option commands. Application developers can customize the compiler based on the guidance provided by these examples. In other words, it is better to teach people to fish than to teach people to fish (provides ideas and insights,not turnkey solutions)
Alternative Source Code Formats alternative source code format
SQLite consists of more than a hundred C files and scripts scattered in different directories. SQLite is implemented by pure ANSI-C, but most C source files are generated or converted by (auxiliary) C programs or AWK,SED, and TCL scripts to generate SQLite libraries. It is a complex process to generate the necessary C program and convert or generate the C language source code.
For simplicity, SQLite provides a single source file, sqlite3.c. This file can build a complete SQLite library. As a single source file, it can be easily included in other applications. All code generation or transformations have been implemented, so there is no need to execute any scripts or any configuration of C programs. The entire library contains a separate conversion unit, the compiler can be optimized in advance, and the performance improvement is between 5% and 10%. Lamented by this, it is strongly recommended to use a single source file compilation.
The use of the amalgamation is recommendedfor all applications.
Of course, it is possible to build SQLite libraries through separate source files, but it is not recommended. For some special applications, the precompiled single-source files downloaded from the web page may not be able to meet the application scenarios that need to modify the compilation steps. Therefore, it is highly recommended to follow the steps below to define a new single source file. That is, even if the project needs to build the SQLite library from an independent source file, it still wants to be able to build the independent source file into a single source file, through the intermediate steps to build the SQLite library (it is still recommended that an amalgamation source file be used asan intermediate step.)
Compile command line interface Compiling The Command-Line Interface
Sqlite3.c:SQLite single source file
The header file of sqlite3.h:sqlite3.c and the C language interface defining SQLite
Shell.c: command line interface program. With the main function, it iteratively waits for the user's input, and then submits the user's input to the engine of the SQLite database for processing.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.