OK, so, the plot thicken.
I managed to compile libsqlite3.so.0 on Linux by downloading the SQLite source (
https://sqlite.org/2021/sqlite-amalgamation-3350500.zip) and executing :
gcc -shared -o libsqlite3.so.0 -fPIC sqlite3.c
I then copied that so.0 file to my project folder, and adjusted the dlopen path to the literal location (because using just the filename makes it load the Linux distribution version) so that it used the most recent version instead of my installed version (which is 3.22.0 2018-01-22 ).
LibHandle := dlopen('/home/me/Documents/Projects/QH/libsqlite3.so.0', RTLD_LAZY);
I then run the steps that execute the SQL code, and no error :-) Hooray
But, there is now no result, either! :-( Hoorooo :-(
So, this confirms the error message was related to the version being used. The problem now is a) ensuring my program load the so file I ship with it, and not the users inbuilt version. Is the best way to do that : LibHandle := dlopen('./libsqlite3.so.0', RTLD_LAZY); ? Is LoadLibrary a better choice than dlopen (I use LoadLibrary for Windows now, so thinking of trying to use it for both Linux and OSX too)
And b) working out why I now do not get any data returned by the SQL.