Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-03

arm-android, SQLite and the default libary

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sven Barth

Hello together!

I'm currently experimenting with porting our Windows Mobile client to Android. After some poor man's debugging I noticed that the wrong SQLite library is loaded. While we might want to change the default library for Android to 'libsqlite.so' I thought I'd experiment with the 'SQLiteDefaultLibrary' variable in sqlite3.inc only learn that sqlite3conn uses its own default variable 'SQLiteLibraryName'. A view into the subversion's log shows that the one in sqlite3.inc was added after the one in sqlite3conn. Now I suggest to either let sqlite3conn additionally check the 'SQLiteDefaultLibrary' or remove the 'SQLiteLibraryName' and use only 'SQLiteDefaultLibrary' to avoid potential further confusion...

Regards,
Sven

Michael Van Canneyt
to Sven Barth
Sven Barth wrote 12 lines
Hello together! I'm currently experimenting with porting our Windows Mobile client to Android. After some poor man's debugging I noticed that the wrong SQLite library is loaded. While we might want to change the default library for Android to 'libsqlite.so' I thought I'd experiment with the 'SQLiteDefaultLibrary' variable in sqlite3.inc only learn that sqlite3conn uses its own default variable 'SQLiteLibraryName'. A view into the subversion's log shows that the one in sqlite3.inc was added after the one in sqlite3conn. Now I suggest to either let sqlite3conn additionally check the 'SQLiteDefaultLibrary' or remove the 'SQLiteLibraryName' and use only 'SQLiteDefaultLibrary' to avoid potential further confusion...

The latter solution is the best. For backwards compatibility, I suggest we do a

SQLiteLibraryName = sqlite3dyn.SQLiteDefaultLibrary

Michael.

Sven Barth
to Michael Van Canneyt
Michael Van Canneyt wrote 22 lines
On Thu, 7 Mar 2013, Sven Barth wrote: > Hello together! > > I'm currently experimenting with porting our Windows Mobile client to > Android. After some poor man's debugging I noticed that the wrong > SQLite library is loaded. While we might want to change the default > library for Android to 'libsqlite.so' I thought I'd experiment with > the 'SQLiteDefaultLibrary' variable in sqlite3.inc only learn that > sqlite3conn uses its own default variable 'SQLiteLibraryName'. A view > into the subversion's log shows that the one in sqlite3.inc was added > after the one in sqlite3conn. Now I suggest to either let sqlite3conn > additionally check the 'SQLiteDefaultLibrary' or remove the > 'SQLiteLibraryName' and use only 'SQLiteDefaultLibrary' to avoid > potential further confusion... The latter solution is the best. For backwards compatibility, I suggest we do a SQLiteLibraryName = sqlite3dyn.SQLiteDefaultLibrary

Done in 23708. Please note that your syntax didn't work, so I did it as follows:

=== code begin ===

var
   SQLiteLibraryName: String absolute sqlite3dyn.SQLiteDefaultLibrary
deprecated 'use sqlite3dyn.SQLiteDefaultLibrary instead';

=== code end ===

Regards,
Sven