[fpc-devel] sqlite support for Android
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Tue Apr 3 14:12:26 CEST 2012
On Tue, Apr 3, 2012 at 11:47 AM, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>> In Android a dlopen operation without a full path will fail:
> A bit of googling suggests that the above statement is wrong:
> http://groups.google.com/group/android-ndk/browse_thread/thread/2779732b85fef9b3#f0cb99298fa286e1
ops, it seams you are correct. In a new test sending only sqlite.so
worked properly ... no idea why the first test failed. Probably I was
using an old APK or library which tested against libsqlite3.so which
fails.
Continuing I have an even much wierder issue. The following code:
procedure TForm3.Button2Click(Sender : TObject) ;
begin
SQLite3Connection1.ExecuteDirect('CREATE TABLE IF NOT EXISTS PRODUTOS ( '+
'CODPRODUTO INTEGER NOT NULL, '+
'DESCRICAO VARCHAR(50), '+
'PRECO NUMERIC(12,3), '+
'ALTERADO TIMESTAMP, '+
' CONSTRAINT PK_PRODUTOS PRIMARY KEY (CODPRODUTO)); ');
end;
Causes a very wierd crash without stacktrace and no way to work
around, but only in LCL-CustomDrawn it works fine in LCL-Gtk2:
(gdb) break fpc_raiseexception
Breakpoint 1 at 0x8058d46
(gdb) cont
Continuing.
MouseMove x=47 y=93
MouseMove x=-9 y=63
MouseMove x=-79 y=47
MouseMove x=-57 y=58
MouseMove x=-26 y=63
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
Missing debug package(s), you should install: sqlite3-debug-3.7.9-1.1.mga1.i586
(gdb) bt
Target is executing.
This package does not exist. And if I add "cthreads" as the first unit
in the project automagically it starts working o.O It looks really
wierd that sqlite is using threading behind my back, or is it sqldb?
Very wierd ... the nasty thing here is that cthreads does not work in
Android so I will have to first get it into working to have sqlite
support. Really unexpected to need threading for sqlite...
--
Felipe Monteiro de Carvalho
More information about the fpc-devel
mailing list