EOSERV Wiki > Page: SQLite Library Method

SQLite Library Method

This is a brief description of the method used to build the library archives available in the modified distributions of SQLite provided at SQLite_Library.

Files needed from http://www.sqlite.org/download.html:

  • sqlite-amalgamatian-#######.zip
  • sqlite-dll-win32-x86-#######.zip (only if building shared library stub)

Both can be unzipped to the same folder as their files don't conflict.

MinGW's g++ package contains all the programs needed to build the library archives.

Linkable SQLite library (sqlite-lib-win32-x86)

'''Files needed:''' sqlite3.c, sqlite3.h, sqlite3ext.h

'''Outputs:''' libsqlite3.a, sqlite3.h, sqlite3ext.h

Run the following commands in the directory containing the necessary files:

> gcc -O2 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE \
  -DSQLITE_ENABLE_COLUMN_METADATA -c sqlite3.c -o sqlite3.o
> ar r libsqlite3.a sqlite3.o

Linkable SQLite shared library (sqlite-lib-dll-win32-x86)

'''Files needed:''' sqlite3.dll, sqlite3.def, sqlite3.h, sqlite3ext.h

'''Outputs:''' libsqlite3.dll.a, sqlite3.dll, sqlite3.h, sqlite3ext.h

Run the following commands in the directory containing the necessary files:

> dlltool -D sqlite3.dll -d sqlite3.def -l libsqlite3.dll.a

EOSERV Wiki > Page: SQLite Library Method