Small. Fast. Reliable.
Choose any three.
*** 1,4 ****
! *: CodeWarrior: Notes on compiling on MacOS using CodeWarrior 
  
  If the "configure" script does not work for you, then you might
  have to compile manually.  Fortunately, this is easy to do.  First
--- 1,6 ----
! * CodeWarrior: Notes on compiling on MacOS using CodeWarrior *
! 
! (see also the MacOSX command line instructions below)
  
  If the "configure" script does not work for you, then you might
  have to compile manually.  Fortunately, this is easy to do.  First
***************
*** 28,42 ****
  
  *DJGPP (32 bit, protected memory DOS)*
  
! libsqlite.a and sqlite.exe may be made for djgpp in a similar way as with HPUX above. it compiles and works out of the box, with the following limitations:
  
  1. temporary files are not removed upon database close (journal file).
  
! 2. files created by sqlite automatically will be correctly created only if lfn is enabled. otherwise, lacking the journal file, the database will be open read-only.
  
  my diffs are fixing both problems, and make sqlite work very well on djgpp.
  
! to avoid overload of this page, i have attached patches to sqlite development tickets. each patch applies for a certain sqlite version, as follows:
  
  for sqlite 2.8.6: diff attached at http://www.sqlite.org/cvstrac/tktview?tn=524
  
--- 30,47 ----
  
  *DJGPP (32 bit, protected memory DOS)*
  
! libsqlite.a and sqlite.exe may be made for djgpp in a similar way as with HPUX above. it compiles and 
! works out of the box, with the following limitations:
  
  1. temporary files are not removed upon database close (journal file).
  
! 2. files created by sqlite automatically will be correctly created only if lfn is enabled. otherwise, lacking 
! the journal file, the database will be open read-only.
  
  my diffs are fixing both problems, and make sqlite work very well on djgpp.
  
! to avoid overload of this page, i have attached patches to sqlite development tickets. each patch applies 
! for a certain sqlite version, as follows:
  
  for sqlite 2.8.6: diff attached at http://www.sqlite.org/cvstrac/tktview?tn=524
  
***************
*** 64,72 ****
  
  it will also do no harm to incorporate it in the main sqlite distribution.
  
! i'm sorry it has not been evident until now, so i am explicitly including the following copyright disclaimer, as required by sqlite author:
  
! *The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights this code under copyright law.*
  
  alex <alexbodn@012.net.il>
  
--- 69,81 ----
  
  it will also do no harm to incorporate it in the main sqlite distribution.
  
! i'm sorry it has not been evident until now, so i am explicitly including the following copyright 
! disclaimer, as required by sqlite author:
  
! *The author or authors of this code dedicate any and all copyright interest in this code to the public 
! domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs 
! and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all 
! present and future rights this code under copyright law.*
  
  alex <alexbodn@012.net.il>
  
***************
*** 84,90 ****
  
  For the *sqlite-source-3_0_8.zip* there's a makefile which
  can be used with MSYS combined with Visual C++.
! This makefile can be found here: http://www.elemental-programming.org/epwiki/SQLID-SQlite%20Makefile
  
  ====
  
--- 93,100 ----
  
  For the *sqlite-source-3_0_8.zip* there's a makefile which
  can be used with MSYS combined with Visual C++.
! This makefile can be found here: http://www.elemental-programming.org/epwiki/SQLID-
! SQlite%20Makefile
  
  ====
  
***************
*** 110,116 ****
  
  2. Unpack sqlite sources and create a directory _sqlite-arm_ in the same dir. 
  
! 3. Edit _configure_ script in the sqlite dir and comment following lines out as shown - have fun finding them ;-)
  
    if test "$cross_compiling" = "yes"; then
     { { echo "$as_me:12710: error: unable to find a compiler for building build tools" >&5
--- 120,127 ----
  
  2. Unpack sqlite sources and create a directory _sqlite-arm_ in the same dir. 
  
! 3. Edit _configure_ script in the sqlite dir and comment following lines out as shown - have fun finding 
! them ;-)
  
    if test "$cross_compiling" = "yes"; then
     { { echo "$as_me:12710: error: unable to find a compiler for building build tools" >&5
***************
*** 143,149 ****
     { (exit 1); exit 1; }; }
  
  
! 4. Save the configure script, change into the build directory you created and call the edited configure script from the sqlite directory by using the following option:
  
  ../sqlite/configure --host=arm-linux
  
--- 154,161 ----
     { (exit 1); exit 1; }; }
  
  
! 4. Save the configure script, change into the build directory you created and call the edited configure 
! script from the sqlite directory by using the following option:
  
  ../sqlite/configure --host=arm-linux
  
***************
*** 160,166 ****
  
  
  6. run _make_
! Now you should find a ".libs" directory in your build directory containing sqlite shared object files, like libsqlite.so.
  
  Source (somewhat altered): http://www.kecher.de/howtos/SQLite-JDBC-Howto.html
  
--- 172,179 ----
  
  
  6. run _make_
! Now you should find a ".libs" directory in your build directory containing sqlite shared object files, like 
! libsqlite.so.
  
  Source (somewhat altered): http://www.kecher.de/howtos/SQLite-JDBC-Howto.html
  
***************
*** 172,180 ****
  	1. Download mingw from www.mingw.org
  	2. Get the sqlite3 source tree
  	3. Get the makefile attached to #931
! 	4. Make sure you have 'gawk', 'sed' and 'grep' (call grep ggrep, or edit the makefile).  Also get upx and install it.
  	5. Type 'make'. 
! 	6. Optionally type 'make doc'.  This requires you to have installed tcl, also available from www.mingw.org.
  
  If you don't want to get and install upx, type 'make sqlite3.exe'. 
  
--- 185,195 ----
  	1. Download mingw from www.mingw.org
  	2. Get the sqlite3 source tree
  	3. Get the makefile attached to #931
! 	4. Make sure you have 'gawk', 'sed' and 'grep' (call grep ggrep, or edit the makefile).  Also get upx 
! and install it.
  	5. Type 'make'. 
! 	6. Optionally type 'make doc'.  This requires you to have installed tcl, also available from 
! www.mingw.org.
  
  If you don't want to get and install upx, type 'make sqlite3.exe'. 
  
***************
*** 203,215 ****
     to sqlite build directory. Invoke (msys's) ../sqlite/configure. This 
     generates a Makefile in the build directory.
  
! 7. Invoke mingw32-make to compile the resulting Makefile. (make isn't used anymore - see http://www.mingw.org/mingwfaq.shtml#faq-mingw32-make.exe)
  
  8. Find within the source distribution a file called sqlite.def.  Copy it
     to the build directory.  
  
  9. Invoke:  dllwrap --dllname sqlite.dll --def sqlite.def *.o
! (or if this doesn't work, dllwrap --def sqlite.def -v --export-all --driver-name gcc --dlltool-name dlltool --as as --target i386-mingw32 -dllname sqlite.dll -lmsvcrt *.o)
  
  9. strip sqlite.dll
  
--- 218,232 ----
     to sqlite build directory. Invoke (msys's) ../sqlite/configure. This 
     generates a Makefile in the build directory.
  
! 7. Invoke mingw32-make to compile the resulting Makefile. (make isn't used anymore - see http://
! www.mingw.org/mingwfaq.shtml#faq-mingw32-make.exe)
  
  8. Find within the source distribution a file called sqlite.def.  Copy it
     to the build directory.  
  
  9. Invoke:  dllwrap --dllname sqlite.dll --def sqlite.def *.o
! (or if this doesn't work, dllwrap --def sqlite.def -v --export-all --driver-name gcc --dlltool-name 
! dlltool --as as --target i386-mingw32 -dllname sqlite.dll -lmsvcrt *.o)
  
  9. strip sqlite.dll
  
***************
*** 222,228 ****
  
  2. Unzip the source to a project directory, e.g. C:\sqlite
  
! 3. Fire up your borland c++ builder and create a new dll project, plain C without mfc or something like that
  
  4. Save the project as (e.g.) C:\sqlite\sqlite.bpr
  
--- 239,246 ----
  
  2. Unzip the source to a project directory, e.g. C:\sqlite
  
! 3. Fire up your borland c++ builder and create a new dll project, plain C without mfc or something like 
! that
  
  4. Save the project as (e.g.) C:\sqlite\sqlite.bpr
  
***************
*** 230,236 ****
  
  6. Remove the unit1.* files from your project
  
! 7. Even if .def files are not the clean way, it will be easier than rewriting the sourcecode. Create the file sqlite.def with the following content and  add it to the project:
  
     LIBRARY sqlite.dll
     EXPORTS
--- 248,255 ----
  
  6. Remove the unit1.* files from your project
  
! 7. Even if .def files are not the clean way, it will be easier than rewriting the sourcecode. Create the file 
! sqlite.def with the following content and  add it to the project:
  
     LIBRARY sqlite.dll
     EXPORTS
***************
*** 284,289 ****
--- 303,309 ----
  
  
  ====
+ 
  *Mac OS X build*
  
  I used the standard Unix build instructions...
***************
*** 295,314 ****
    $ make                        Builds "sqlite" and "libsqlite.a" 
    $ make test                   Optional: run regression tests 
  
! *But* don't forget the implied
  
    $ make install
  
! step!
  
  The --disable-shared option is required for Mac OS X because libtool
  is busted and will generate an invalid shared library.
  
! The usability of the sqlite shell is greatly enhanced if you have readline support. If you install GNU readline first, sqlite will link to it automatically. 
  
  ====
  
! Under AIX 4.3.3 with gcc
  
    fmedico <at> yahoo.com
  
--- 315,341 ----
    $ make                        Builds "sqlite" and "libsqlite.a" 
    $ make test                   Optional: run regression tests 
  
! But don't forget the implied
  
    $ make install
  
! step! (if you are installing in /usr/local you might have to do this as root, e.g.: "sudo make install")
! 
  
  The --disable-shared option is required for Mac OS X because libtool
  is busted and will generate an invalid shared library.
  
! The usability of the sqlite shell is greatly enhanced if you have readline support. If you install GNU 
! readline first, sqlite will link to it automatically. Note that sqlite doesn't search in the fink (/sw) hierachy 
! by default, so if you want to use fink readline you'll probably have to use compilation flags to point the 
! configure script to /sw/lib and /sw/include/readline as well as adding /sw/lib to the 
! DYLD_LIBRARY_PATH environment (WARNING: NOT TESTED!). Instead of doing this it might be easier 
! just to install readline in the default location under /usr/local (readline 5 installs without a hiccough 
! using the regular .configure; make; make install).
  
  ====
  
! * Under AIX 4.3.3 with gcc *
  
    fmedico <at> yahoo.com
  
***************
*** 337,343 ****
  A similar change has already been checked into the CVS tree and should
  appear with release 2.8.6.
  
! In 2.8.13 an extra slash passed to libtool caused me some trouble installing on cygwin.  Removing each occurance of $(DESTDIR)/ from Makefile did the trick.  There were eight, all in the install section.  This var is handy for distributions, so probably don't want to remove.  
  
  ====
  
--- 364,372 ----
  A similar change has already been checked into the CVS tree and should
  appear with release 2.8.6.
  
! In 2.8.13 an extra slash passed to libtool caused me some trouble installing on cygwin.  Removing each 
! occurance of $(DESTDIR)/ from Makefile did the trick.  There were eight, all in the install section.  This 
! var is handy for distributions, so probably don't want to remove.  
  
  ====
  
***************
*** 463,469 ****
  
  
  
! Now you can just build sqlite along with the rest of boost.  Tested on VC7.1 and GCC 3.3.1.  Boost jam builds debug, release, static, and dynamically linked targets with a lack of fuss and 
  bother.
  
  
--- 492,499 ----
  
  
  
! Now you can just build sqlite along with the rest of boost.  Tested on VC7.1 and GCC 3.3.1.  Boost jam 
! builds debug, release, static, and dynamically linked targets with a lack of fuss and 
  bother.
  
  
***************
*** 484,490 ****
  
  edit Makefile, change the TCC macro:
  
!      TCC = xlc -q32 -qlonglong  -D_LARGE_FILE=1 -D_LARGE_FILES=1 -DUSE_TCL_STUBS=1 -O2 -DOS_UNIX=1 -DOS_WIN=0 -DHAVE_USLEEP=1 -I. -I${TOP}/src
  
     make
  
--- 514,521 ----
  
  edit Makefile, change the TCC macro:
  
!      TCC = xlc -q32 -qlonglong  -D_LARGE_FILE=1 -D_LARGE_FILES=1 -DUSE_TCL_STUBS=1 -O2 
! -DOS_UNIX=1 -DOS_WIN=0 -DHAVE_USLEEP=1 -I. -I${TOP}/src
  
     make
  
***************
*** 495,509 ****
  
  *Building a statically linked libtclsqlite*
  
! I use SQLite as part of a Starkit-based application. See http://equi4.com/tclkit.html and http://equi4.com/starkit.html
  
  In assembling a Starkit for Linux, one problem is incompatibility between
  different verions of glibc (e.g. RedHat 7.2 using glibc2.2, RedHat 8.0 using
! glibc2.3).  There is a static build of tclkit for linux that avoids this problem by statically linking all libraries.  I wanted the SQLite extension for Tcl to have the same feature.  
  
  Here are steps to build a statically linked Tcl extension:
  
! First, make sure that the -DUSE_TCL_STUBS=1 macro is defined in your TCC makefile macro.  We will be linking manually, so if using gcc, get the
  path to the libgcc.a for your installation:
  
     gcclib=`gcc -print-libgcc-file-name`
--- 526,543 ----
  
  *Building a statically linked libtclsqlite*
  
! I use SQLite as part of a Starkit-based application. See http://equi4.com/tclkit.html and http://
! equi4.com/starkit.html
  
  In assembling a Starkit for Linux, one problem is incompatibility between
  different verions of glibc (e.g. RedHat 7.2 using glibc2.2, RedHat 8.0 using
! glibc2.3).  There is a static build of tclkit for linux that avoids this problem by statically linking all 
! libraries.  I wanted the SQLite extension for Tcl to have the same feature.  
  
  Here are steps to build a statically linked Tcl extension:
  
! First, make sure that the -DUSE_TCL_STUBS=1 macro is defined in your TCC makefile macro.  We will be 
! linking manually, so if using gcc, get the
  path to the libgcc.a for your installation:
  
     gcclib=`gcc -print-libgcc-file-name`
***************
*** 512,521 ****
  
     echo '' >>Makefile
     echo 'static-libtclsqlite.so:       tclsqlite.lo $(LIBOBJ)' >>Makefile
!    echo "          ld -shared -soname libtclsqlite.so  -o libtclsqlite.so *.o -L/usr/local/lib -ltclstub8.4  -static -ldl -lm -lc  $gcclib" >>Makefile
  
  
! Note that a tab should be inserted a the first character of the second line. Adjust your path to your Tcl install if not /usr/local/lib in order to find libtclstub8.4.a.  Now build:
  
     make
     make static-libtclsqlite.so
--- 546,557 ----
  
     echo '' >>Makefile
     echo 'static-libtclsqlite.so:       tclsqlite.lo $(LIBOBJ)' >>Makefile
!    echo "          ld -shared -soname libtclsqlite.so  -o libtclsqlite.so *.o -L/usr/local/lib -ltclstub8.4  
! -static -ldl -lm -lc  $gcclib" >>Makefile
  
  
! Note that a tab should be inserted a the first character of the second line. Adjust your path to your Tcl 
! install if not /usr/local/lib in order to find libtclstub8.4.a.  Now build:
  
     make
     make static-libtclsqlite.so
***************
*** 526,540 ****
  
  **[ ULTRIX/VAX 4.4 ]**
  
! I successfully got Sqlite 2.8.13 to compile under ULTRIX/VAX 4.4 (4.x should work fine, not sure about earlier versions).  
! 
! SQLite would NOT compile with VAX C, I had to install GCC and GNU make.  There are binary packages out there for GCC 3.0.4 and GNU MAKE floating around on the net.
  
! After setting the CC and CPP environment variables to the location of GCC (in my case it was /usr/freeware/gnu-tools/vax/bin/gcc) and the preprocessor, SQLite compiled out of the box, just run configure, then GNU make (stock BSD make will NOT work!) and it will chew on it for a couple hours (hey, it's still a VAX), and in theory you should have working Ultrix SQLite.  
  
! NOTE:  Remember, Ultrix has no support for shared libraries, if you want to use SQLite in an application, you have to compile sqlite in as a static library.  This goes for TCL as well, you have to recompile TCL with libsqlite.la and libtclsqlite.la compiled smack inline.
! 
! No, I don't have any benchmarks unfortunately.  It would be funny to benchmark SQLite against the University Ingres QUEL DBMS that ships with Ultrix on the UNSUPPORTED software distribution on the CD/TK50 tape/whatever else Ultrix shipped on.
  
  My configuration:
  
--- 562,585 ----
  
  **[ ULTRIX/VAX 4.4 ]**
  
! I successfully got Sqlite 2.8.13 to compile under ULTRIX/VAX 4.4 (4.x should work fine, not sure about 
! earlier versions).  
  
! SQLite would NOT compile with VAX C, I had to install GCC and GNU make.  There are binary packages 
! out there for GCC 3.0.4 and GNU MAKE floating around on the net.
  
! After setting the CC and CPP environment variables to the location of GCC (in my case it was /usr/
! freeware/gnu-tools/vax/bin/gcc) and the preprocessor, SQLite compiled out of the box, just run 
! configure, then GNU make (stock BSD make will NOT work!) and it will chew on it for a couple hours 
! (hey, it's still a VAX), and in theory you should have working Ultrix SQLite.  
! 
! NOTE:  Remember, Ultrix has no support for shared libraries, if you want to use SQLite in an 
! application, you have to compile sqlite in as a static library.  This goes for TCL as well, you have to 
! recompile TCL with libsqlite.la and libtclsqlite.la compiled smack inline.
! 
! No, I don't have any benchmarks unfortunately.  It would be funny to benchmark SQLite against the 
! University Ingres QUEL DBMS that ships with Ultrix on the UNSUPPORTED software distribution on the 
! CD/TK50 tape/whatever else Ultrix shipped on.
  
  My configuration:
  
***************
*** 552,573 ****
  
  *Compiling SQLite with MS VC++ 5 for C newbies*
  
! This is a step-by-step procedure for those like me who wish to recompile SQLite and the "VB Wrapper" by Steve O'Hara to make this DLL VB-friendly. Note that I don't remember much from my C days, so should any kind soul spot any error, please add your corrections:
  
  1: Install MS VC++
! 1: File | New | Projects : Choose Win32 DLL, and give a name to your new project. It will be saved in its own subdirectory under "\Program Files\DevStudio\MyProjects\". Choose the name carefully as it will be the one used to generate the DLL
! 1: Unzip the SQLite source code into this directory (Caution: I understand that there are two versions of the source code. One is the most generic, ie. not meant for a particular OS, while one source package has been massaged, ready to be compiled by MS VC++. Choose the latter)
! 1: Project | Add to project | Files, navigate to the folder where your project lives and now contains the SQLite source files, and select all its C files to have them added to your project (Note: To remove a file from a project, select it once with the mouse, and hit the DEL key. There is no option in the menu, either the application's or the pop-up's)
  1: If you have no use for TCL (a scripting language), remove tclsqlite.c
! 1: Build | Set Active Configuration, and select "My project - Win32 Release" so we generate a plain DLL, with no debug infos
! 1: If you wish to add version information so you get a Version tab when right-clicking on the DLL in Windows Explorer, select Project | Add to project | New : Resource Script. A clear-text res.rc is added to the project that you can edit to include version information (I haven't found how to have the version be incremented automatically.) Note that this version info embedded by VC++ is independent from the version info returned by sqlite_libversion(), ie. don't worry about the fact that the former is a four-digit number, while the latter uses three
! 1: Build | Rebuild All. You'll see plenty of warnings, but if all goes well, you should now have a DLL in a Release/ subdirectory in your project directory
! 
! If you wish to use Steve O'Hara's free VB wrapper ("VB Wrapper", ex-psvbutls32 in the Files section of the now dead SQLite mailing list over at Yahoo), just add its source file pssql.c and its export file pssql.def to your project, edit the DEF file so that the LIBRARY line matches the name of your DLL (or you'll get a warning), and build the DLL.
! 
! Note that pssql.c assumes that the SQLite source code is located in a sqlite/ subdirectory, so either create a subdirectory to host the SQLite source files, or edit this file to have all the C files in the same directory. If the DEF file is missing, you'll get ""Runtime Error 453 Can't find DLL entry point PSVBUTLS_VersionDB in mysqlite.dll" when calling any of the wrapper's exported functions.
  
! To check that this DLL works fine, create a new project in VB, add the following code in a form, and hit F5:
  
  	Private Declare Function PSVBUTLS_VersionDB$ Lib "mysqlite.dll" ()
  
--- 597,641 ----
  
  *Compiling SQLite with MS VC++ 5 for C newbies*
  
! This is a step-by-step procedure for those like me who wish to recompile SQLite and the "VB Wrapper" 
! by Steve O'Hara to make this DLL VB-friendly. Note that I don't remember much from my C days, so 
! should any kind soul spot any error, please add your corrections:
  
  1: Install MS VC++
! 1: File | New | Projects : Choose Win32 DLL, and give a name to your new project. It will be saved in its 
! own subdirectory under "\Program Files\DevStudio\MyProjects\". Choose the name carefully as it will 
! be the one used to generate the DLL
! 1: Unzip the SQLite source code into this directory (Caution: I understand that there are two versions of 
! the source code. One is the most generic, ie. not meant for a particular OS, while one source package 
! has been massaged, ready to be compiled by MS VC++. Choose the latter)
! 1: Project | Add to project | Files, navigate to the folder where your project lives and now contains the 
! SQLite source files, and select all its C files to have them added to your project (Note: To remove a file 
! from a project, select it once with the mouse, and hit the DEL key. There is no option in the menu, 
! either the application's or the pop-up's)
  1: If you have no use for TCL (a scripting language), remove tclsqlite.c
! 1: Build | Set Active Configuration, and select "My project - Win32 Release" so we generate a plain DLL, 
! with no debug infos
! 1: If you wish to add version information so you get a Version tab when right-clicking on the DLL in 
! Windows Explorer, select Project | Add to project | New : Resource Script. A clear-text res.rc is added to 
! the project that you can edit to include version information (I haven't found how to have the version be 
! incremented automatically.) Note that this version info embedded by VC++ is independent from the 
! version info returned by sqlite_libversion(), ie. don't worry about the fact that the former is a four-digit 
! number, while the latter uses three
! 1: Build | Rebuild All. You'll see plenty of warnings, but if all goes well, you should now have a DLL in a 
! Release/ subdirectory in your project directory
! 
! If you wish to use Steve O'Hara's free VB wrapper ("VB Wrapper", ex-psvbutls32 in the Files section of 
! the now dead SQLite mailing list over at Yahoo), just add its source file pssql.c and its export file 
! pssql.def to your project, edit the DEF file so that the LIBRARY line matches the name of your DLL (or 
! you'll get a warning), and build the DLL.
! 
! Note that pssql.c assumes that the SQLite source code is located in a sqlite/ subdirectory, so either 
! create a subdirectory to host the SQLite source files, or edit this file to have all the C files in the same 
! directory. If the DEF file is missing, you'll get ""Runtime Error 453 Can't find DLL entry point 
! PSVBUTLS_VersionDB in mysqlite.dll" when calling any of the wrapper's exported functions.
  
! To check that this DLL works fine, create a new project in VB, add the following code in a form, and hit 
! F5:
  
  	Private Declare Function PSVBUTLS_VersionDB$ Lib "mysqlite.dll" ()