EOSERV Wiki > Page: SQLite Library Method > History > View Revision

View Revision: 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 -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.a, sqlite3.dll, sqlite3.h, sqlite3ext.h

Modify sqlite3.def by placing the following line of text at the beginning of the file:

LIBRARY sqlite3.dll
EXPORTS
sqlite3_aggregate_context
sqlite3_aggregate_count
...

Then run the following command:

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

EOSERV Wiki > Page: SQLite Library Method > History > View Revision