Re: Building static library of luajit with lsqlite3

  • From: Mike Pall <mike-1311@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 26 Nov 2013 17:07:42 +0100

Dominik Weinhold wrote:
> opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
>  libluajit.a(lib_sqlite3.o): in function 
> cleanupvm:lib_sqlite3.c(.text+0x16c): error: undefined reference to 
> 'sqlite3_finalize'

Well, this has little to do with LuaJIT.

The Android NDK is kind of a second citizen of the Android
ecosystem. Only very few C libraries are actually exposed through
the NDK, even though plenty more C libraries are present on most
Android devices. For those not exposed there are no ABI-stability
guarantees, either.

Anyway, e.g. OpenSSL or SQLite have been there for ages and have
upwards-compatible ABIs. You can search at stackoverflow.com for
various workarounds on how to link against those libraries.

Probably the easiest way for you would be to pick one of the FFI
bindings for SQLite. The FFI binds to libraries at runtime so you
don't need to worry about linking issues on the C side.

BTW: Please do not send HTML mails to this mailing list. Check
     the settings of your mail client.

--Mike

Other related posts: