SQLite编译 (How To Compile SQLite)

Excerpt: HTTP: //www.sqlite.org/howtocompile.html
 
Amalgamation Versus Individual Source Files with a single source file merge
SQLite is in line with standard ANSI-C source code libraries. It must be compiled into machine code before use. This article is a guide on how to compile the SQLite in different ways.
 
This article will not teach you hands compiled SQLite (step-by-steprecipe step by step recipes). In view of the development of different platforms, it is difficult to provide a unified description. Instead, this article merely describes and explains the basic principles of SQLite compiled.
The following provides some examples of common compile command contained in these examples, to help application developers to quickly develop their own custom compiler
 
below provides a number of examples that includes many typical compiler options command. Application developers can provide guidance based on these examples, the custom compiler. In other words, Give a man a fish than giving the fish (the Provides Insights and Ideas, not Turnkey Solutions)
 
Alternative Source Code Formats alternative source code format
SQLite is composed of more than one hundred and C script files scattered in different directories. SQLite is implemented by pure ANSI-C, but most of the C language source code files are made (auxiliary) C program or AWK, SED, and TCL script generation or conversion to generate SQLite library. Wherein generating the C program and must be converted into C language source code or generated itself is a complex process.
 
For simplicity, SQLite provides a single source file sqlite3.c. The file can build a complete SQLite library. As a single source file, it can be easily included in other applications of them. All code generation or conversion have been achieved, there is no need to perform any of the scripts, without having to configure any C program. The entire library contains a single conversion unit, the compiler can optimize advance in performance between 5% to 10%. Feeling this strongly recommend the use of a single source file is compiled manner.
The use of the amalgamation is recommendedfor all applications.
Of course, the SQLite library can be constructed by a separate source file, but not recommended. For some special applications, downloaded from the website has been pre-compiled single source file may not need to be modified to meet the compile step scenarios. Thus, strongly recommends the following steps define a new single source code file. That is, even if the project needs to start building the SQLite library from a separate source file, or hope to build a separate source files into a single source file, by way of intermediate steps, to build SQLite library (it is still recommended that an amalgamation source file be used asan intermediate step).
 
compiler command-line interface to the command-line Interface at the compiling
 
sqlite3.c: SQLite single source file
sqlite3.h: sqlite3.c header file and defines the SQLite C language interface
shell.c: command line Interface program. It has a main function, loop waiting for user input, and then enter the user submitted to the SQLite database engine processes.

Guess you like

Origin blog.51cto.com/fengyuzaitu/2429356