On Thu, 14 Oct 2010, Andrea Mauri wrote:
Il 14/10/2010 15:51, Michael Van Canneyt ha scritto:
Yes. Put the following in the startup code of your app:
uses sqlite3dyn;
begin
InitializeSqlite('libsqlite3.so.0');
end;
I tried but now I get the following error when I create at runtime the sqlite
db and related tables:
sqlite interface already initialized from library libsqlite3.so.0
Hm. This is a bug. Or rather, a shortcoming. The connection should detect
whether the library is already loaded, and if so, re-use that name.
(The sqliteLibrary variable can be used for that). Better yet, the library
name should be configurable in the connection instance.
Can you please enter a bugreport for this ?
More sophisticated would be to detect which file actually exists, and use
the correct filename.
How can I do that? Suggestions?
The above bug prevents you from doing this.
What you can try to do is create the symbolic link yourself, in the
installation procedure - I assume it will be executed as root.
If it is not executed as root, you can still create the link in the
application install directory, and start the application with a shell
script that sets the LD_LIBRARY_PATH containing the application install
directory prior to starting the actual binary.
This is currently the best option, till we fix the above bug.
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus