How to configure dotConnect to use an alternative SQLite lib?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
klosels
Posts: 10
Joined: Wed 31 Oct 2018 16:33

How to configure dotConnect to use an alternative SQLite lib?

Post by klosels » Tue 05 Apr 2022 11:24

TL;DR: How can dotConnect for SQLite be configured to use an alternatively named SQLite shared library?

Full story: we're using dotConnect for SQLite for a long time (licensed customer) in conjunction with an alternative SQLite library supporting encryption (https://github.com/utelle/SQLite3MultipleCiphers).

On Windows, things are easy as we simply rename the DLL as sqlite3.dll and place it beside the executable where it gets picked up automatically.

As we're starting to support .NET5+ on Linux, things get more complicated: the shared library is by default not loaded from the executable's directory (unless modifying LD_LIBRARY_PATH), and placing it in e.g. /usr/lib should be supported. Therefore, however, we'd need to keep the library's original name of libsqlite3mc.so to avoid conflicts with a standard libsqlite3.so.
How could we do this and tell dotConnect to load that differently named SQLite library?

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: How to configure dotConnect to use an alternative SQLite lib?

Post by DmitryGm » Sun 01 May 2022 11:33

We do not have a ready-made solution for all Linux distributions. You will have to figure out the dependencies of the libraries in your local environment yourself. You may use symbolic links or a specific LD_LIBRARY_PATH environment variable for the user who runs the program, or something else.

Post Reply