[Lazarus] Dynamic loading of a custom sqlite library

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Fri Jun 10 09:10:28 CEST 2011

On Fri, 10 Jun 2011, Maxim Ganetsky wrote:

> 09.06.2011 13:17, Max Vlasov пишет:
>> Finally found that this was because sqlite3 was in the uses list, so
>> actually it was scenario when fpc linked sqlite dynamically and besides
>> I did my own dynamic loading with my own unit of another version/file of
>> sqlite. So probably there was a conflict with shared data. In my case it
>> looks like everything was ok if the linked library and loaded was the
>> same file (system libsqlite3.so). But if linked was system libsqlite3.so
>> and my loaded was a library with a different name/soname the faults took
>> place.
>> Just curious, such things occasionally can happen from time to time. Is
>> this about the way sqlite library is compiled so no two independent
>> copies of the library coexist dynamically linked/loaded due to
>> intersetion of the shared data. Or this is about the way linux handles
>> them?
> It is best to ask this question in FPC devel mailing list, this behavior 
> may be a bug.

It is not a FPC bug; you're not supposed to use the 2 units at the same time.
There is no way the compiler can detect this. At best the linux linker
should detect it.


More information about the Lazarus mailing list