Open main menu

CDOT Wiki β

SQLite Xerial JDBC From Source

Revision as of 19:55, 19 December 2011 by Cwdesautels (talk | contribs) (SQLite Extensions)

Windows

Setup

  • Install Cygwin from here [1], During the install include these additional libraries:
    • make
    • curl
    • unzip
    • mingw64-x86_64-gcc-core (Optional: win64 native library recompile)
  • Install Mercurial HG, available here [2]
  • Install Java SDK 1.5+, available here [3]
    • Add java/bin to PATH
    • On Command line, type java -version to check
  • Install Maven 3.0.2+, available here [4]
    • add maven/bin to PATH
    • On Command line, type mvn -version to check

Steps

  • Clone the Xerial repo, type:
  • Go into repo folder, type:
    • cd sqlite-jdbc
  • Start the build, type:
    • make
  • Retrieve the newly built, compiled and tested jar at:
    • sqlite-jdbc/target/sqlite-jdbc-3.7.*.jar

SQLite addtions

  • For a full list of compilation options see here [5]
  • To add compilation options to sqlite:
    • Edit Makefile in the repo root starting at Ln. 58

SQLite Extensions

  • To add extensions to sqlite at compile time:
    • append -L./ -lyourDllName.dll at Ln.67
  • To add extensions to sqlite at cmd line:
    • select load_extension("yourQuotedDllName.dll");
    • .load yourQuotedDllName.dll
  • To add extensions through the NexJ framework:
    • m_appender.appendSQL("select load_extension('yourQuotedDllName.dll')");