lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


thanks man for you answer but I couldn't get the dll working!
I really appreciate it if you help me get this thing working.

here's what I did:
  • os: ubuntu 13.10
  1. download SQLite3 amalgamation from http://www.sqlite.org/download.html  >>>>http://www.sqlite.org/2014/sqlite-amalgamation-3080500.zip
  2. download lsqlite3 from http://lua.sqlite.org/ >>>http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09b.zip?uuid=fsl_9b
  3. download lua 5.1 from http://www.lua.org/source/5.1/ >>>http://www.lua.org/ftp/lua-5.1.tar.gz
  4. put #1 and #2 files in the same folder
  5. execute this command in terminal: >>>gcc -O2 -fPIC -shared -o lsqlite3.dll -I /home/ub-wiki/lsqlite3/lua-5.1/src -I . -D SQLITE_ENABLE_FTS3 -D SQLITE_ENABLE_FTS4 -D SQLITE_ENABLE_RTREE lsqlite3.c sqlite3.c
result is lsqlite3.dll but when I want to load it in my lua application(I'm using Autoplay Media Studio 8.3), it gives me this error:



On Sun, Jul 6, 2014 at 10:14 AM, Michal Kottman <michal.kottman@gmail.com> wrote:

On Jul 5, 2014 8:50 PM, "ayyub khademi" <wiki.job.kh@gmail.com> wrote:
>
> How Can I build luasqlite3 dll binaries so that they support sqlite extensions especially FTS3 & FTS4?

It actually quite simple. You need to get the SQLite3  amalgamation (single source file + header) and the lsqlite3.c file in a single directory. Then it's just (I did this for Linux but I hope it's the same for MinGW on Windows):

gcc -O2 -fPIC -shared -o lsqlite3.dll -I <path/path/to/lua/headers> -I . -D SQLITE_ENABLE_FTS3 -D SQLITE_ENABLE_FTS4 -D SQLITE_ENABLE_RTREE lsqlite3.c sqlite3.c

For more options see: http://www.sqlite.org/compile.html