Skip to Main Content
Using SQLite
book

Using SQLite

by Jay A. Kreibich
August 2010
Intermediate to advanced content levelIntermediate to advanced
526 pages
23h 39m
English
O'Reilly Media, Inc.
Content preview from Using SQLite

Building

There are a number of different ways to build SQLite, depending on what you’re trying to build and where you would like it installed. If you are trying to integrate the SQLite core into a host application, the easiest way to do that is to simply copy sqlite3.c and sqlite3.h into your application’s source directory. If you’re using an IDE, the sqlite3.c file can simply be added to your application’s project file and configured with the proper search paths and build directives. If you want to build a custom version of the SQLite library or sqlite3 utility, it is also easy to do that by hand.

All of the SQLite source is written in C. It cannot be compiled by a C++ compiler. If you’re getting errors related to structure definitions, chances are you’re using a C++ compiler. Make sure you use a vanilla C compiler.

Configure

If you’re using the Unix amalgamation distribution, you can build and install SQLite using the standard configure script. After downloading the distribution, it is fairly easy to unpack, configure, and build the source:

$ tar xzf sqlite-amalgamation-3.x.x.tar.gz
$ cd sqlite-3.x.x
$ ./configure
  [...]
$ make

By default, this will build the SQLite core into both static and dynamic libraries. It will also build the sqlite3 utility. These will be built with many of the extra features (such as full text search and R*Tree support) enabled. Once this finishes, the command make install will install these files, along with the header files and sqlite3 manual page. By default, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning SQL, 3rd Edition

Learning SQL, 3rd Edition

Alan Beaulieu
High Performance MySQL, 4th Edition

High Performance MySQL, 4th Edition

Silvia Botros, Jeremy Tinley

Publisher Resources

ISBN: 9781449394592Errata PageSupplemental Content