Aw: Re: Building static library of luajit with lsqlite3

  • From: "Dominik Weinhold" <djweinhold@xxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 28 Nov 2013 17:29:09 +0100 (CET)

Thanks for the information.

To bring this to an end where someone else can benefit: 
I did the following:

I copied the sqlite3.c and sqlite3.h from the sqlite source to luajit-2.0/src 
and added sqlite3.o to luajit-2.0/src/Makefile to the section LJCORE_O. Sure 
this has the downside that the luajit library grows.
After that it compiled just as I needed it to.

Thanks or your help Mike.

Greetings
Dominik
 
 

Gesendet: Dienstag, 26. November 2013 um 17:07 Uhr
Von: "Mike Pall" <mike-1311@xxxxxxxxxx>
An: luajit@xxxxxxxxxxxxx
Betreff: Re: Building static library of luajit with lsqlite3
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
 
-- 
Diese E-Mail wurde aus dem Sicherheitsverbund E-Mail made in
Germany versendet: http://web.de/e-mail-made-in-germany

Other related posts:

  • » Aw: Re: Building static library of luajit with lsqlite3 - Dominik Weinhold