[fpc-pascal] Cannot use SQLite 64 bit dll

Dennis dec12 at avidsoft.com.hk
Fri Oct 19 19:22:22 CEST 2018


Using Lazarus and FPC and sqlite3conn unit, I can use the sqlite3.dll on 
windows without problem.

However, when I try to convert my project to win 64, it just fail 
without any warning.

I am using
     FPC 3.1.1 Revision 63034
     Lazarus 1.9.0
     both are Win64

I download the win 64 bit version of sqlite3.dll from
https://www.sqlite.org/2018/sqlite-dll-win64-x64-3250200.zip
and place it in the same folder as my exe.

The project compiles without errors nor warning.

But when I run the exe, it just waits a few seconds and then quits silently.

I tried debugging it and set breakpoints at all of  the following in 
sqlite3.inc
function TryInitializeSqlite(const LibraryName: UnicodeString): Integer;
function InitialiseSQLite:integer;
function  InitializeSQLiteANSI(const LibraryName: AnsiString):integer;
function  InitializeSQLite(const LibraryName: UnicodeString) :integer;
function  InitialiseSQLite(const LibraryName: UnicodeString):integer;

and the following in SQLite3Conn:
class function TSQLite3ConnectionDef.DefaultLibraryName: string;
class function TSQLite3ConnectionDef.LoadedLibraryName: string;
class function TSQLite3ConnectionDef.LoadFunction: TLibraryLoadFunction;

However, the debugger did not stop at all at any of them.

What could possibly be the cause of the problem?

Dennis



More information about the fpc-pascal mailing list