Small. Fast. Reliable.
Choose any three.

Page History

Turn Off History

If the "configure" script does not work for you, then you might have to compile manually. Fortunately, this is easy to do. First download the preprocessed source code from http://www.sqlite.org/sqlite_source.zip. This archive contains a set of C source and header files that are ready to be passed to a C compiler. To build the library, just compile all of the files.

Note that the files "shell.c" and "tclsqlite.c" are special and do not belong in the SQLite library proper. "shell.c" is used to build the "sqlite" shell program and "tclsqlite.c" is the TCL bindings for SQLite. You may want to omit both of these files when you build the library.

For example, I was able to compile SQLite for HPUX as follows:

  unzip sqlite_source.zip
  rm tclsqlite.c
  for i in *.c; do c89 -O -c $i; done
  rm shell.o
  ar cr libsqlite.a *.o
  ranlib libsqlite.a
  c89 -o sqlite shell.c libsqlite.a


libsqlite.a and sqlite.exe may be made for djgpp in a similar way as above. it compiles and works out of the box, with the following limitations:

1. temporary filenames are not removed upon close.

2. files created by sqlite automatically will be correctly created only if lfn is enabled. otherwise, the database will be read-only. (i couldn't create tables, but i didn't try to insert records in existent ones).

the diff i'm appending is fixing all the above problems, and makes sqlite function very well on djgpp. beneath there is another djgpp solution, which i think has been already applied.

my patch applies to sqlite version 2.8.6, and i didn't check any other version.

to avoid overload of this page, i have attached the diff to a development ticket: http://www.sqlite.org/cvstrac/tktview?tn=524 . it will also do no harm to incorporate it in the main sqlite distribution.

To get it compiling on DJGPP (DOS) you need to patch src/os.c with the following (unified diff):

	--- ../temp/sqlite/src/os.c	2002-10-20 20:16:50.000000000 +0000
	+++ src/os.c	2002-12-24 18:31:16.000000000 +0000
	@@ -27,6 +27,10 @@
	 # include <winbase.h>
	 #endif

	+#if (!defined __DJGPP__) && (!defined O_BINARY)
	+#define O_BINARY 0
	+#endif
	+
	 /*
	 ** Macros fterface adding patch-sets, bug tracking, and Wiki           
            to CVS.  http://www.hwaci.com/sw/cvstrac/.