Lazarus

Programming => Databases => Topic started by: chrnobel on June 22, 2006, 10:11:21 pm

Title: How can I embed the Sqlite library?
Post by: chrnobel on June 22, 2006, 10:11:21 pm
Hi.

I have made an application using the Sqlite3Dataset - works fine, I can retrieve data and I can update data, no problem.

First I did not have Sqlite installed on my Ubuntu, so I just copied  sqlite-3.3.5.so to the same directory as the executable and that worked fine.

After updating the Ubuntu (to 6.06) the 3.2.8 version of Sqlite was installed, so now Sqlite3Dataset uses that.

The question is now, how can I force my application to always use the sqlite library in the same library as my executable, as I would prefer to be 100% certain that the application I distribute always have the version of the library that I have decided to use - in other words, the user sees it as an embedded Sqlite application?

Even if I do have the library file in the same directory it ignores it, and uses the one in the path.

Any ideas?

Christian
Title: RE: How can I embed the Sqlite library?
Post by: felipemdc on July 19, 2006, 06:35:26 pm
On Windows this is very easy. Just put the library on the same directory as the executable.

On Linux I have no idea how this could be done. Selecting which library will be used is a task for the kernel, and linux doesn´t care about executable directory.