System.Data.SQLite

Using System.Data.SQLite 2.x with SEE
Login

What's new

In the past, using SEE with System.Data.SQLite required replacing the SQLite amalgamation with a SEE amalgamation and rebuilding.

For System.Data.SQLite 2.x, the build system only deals with the C# code, and the C code (for SQLite or SEE) needs to be built separately, using the normal way for a shared library.

So in most cases, you don't need to rebuild SDS in order to use SEE. Add this nuget package to get System.Data.SQLite itself:

https://www.nuget.org/packages/System.Data.SQLite/2.0.1

Then you need SEE compiled as a shared library with "e_sqlite3" as its base name. For example, on Windows, the name would be "e_sqlite3.dll", and on Linux it would be "libe_sqlite3.so".

Instructions to build

Here is an example of how to build e_sqlite3.dll from SEE using a Visual Studio command prompt:

CL.exe /nologo /c /guard:cf /W1 /WX- /sdl- /O2 /Oi /Oy- /D SQLITE_API=__declspec(dllexport) /D SQLITE_CORE /D SQLITE_DEFAULT_FOREIGN_KEYS=1 /D SQLITE_DLL=1 /D SQLITE_DQS=0 /D SQLITE_ENABLE_COLUMN_METADATA /D SQLITE_ENABLE_FTS3_PARENTHESIS /D SQLITE_ENABLE_FTS4 /D SQLITE_ENABLE_FTS5 /D SQLITE_ENABLE_GEOPOLY /D SQLITE_ENABLE_JSON1 /D SQLITE_ENABLE_MATH_FUNCTIONS /D SQLITE_ENABLE_PREUPDATE_HOOK /D SQLITE_ENABLE_RTREE /D SQLITE_ENABLE_SESSION /D SQLITE_ENABLE_SNAPSHOT /D SQLITE_LIKE_DOESNT_MATCH_BLOBS /D SQLITE_OS_WIN /D SQLITE_WIN32_FILEMAPPING_API=1 /D NDEBUG /D _USRDLL /D _WINDLL /DEBUG:FULL /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:inline /Zc:forScope /Fo".\obj\" /Gd /TC /analyze- sqlite3-see.c

link.exe  /nologo /OUT:"e_sqlite3.dll" /SUBSYSTEM:CONSOLE /DEBUG:FULL /DEBUGTYPE:CV,FIXUP /INCREMENTAL:NO /OPT:REF /OPT:ICF /TLBID:1 /guard:cf /WINMD:NO /DYNAMICBASE /NXCOMPAT /MACHINE:X64 /DLL /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed obj\sqlite3-see.obj

You may want to review the various build options and adjust them for your situation.

SEE builds in nuget packages

For those who prefer the convenience of SEE builds in the form of nuget packages, they are available to SEE licensees from SourceGear's SQLite build service.

The cost for a subscription to this service is $600 USD per year, which includes:

Note that the service is provided on an annual subscription basis, but the packages themselves never "expire". The SourceGear SQLite build service merely provides the convenience of having SEE builds which are maintained, up-to-date, and in nuget packages. The license for SEE itself remains perpetual.

Contact Eric Sink (eric@sourcegear.com or eric@sqlite.org) for more information.