SQLite Forum

loadable extension ext/misc/fileio.c throws "undefined symbol sqlite3_sqlitefileio_init"
Login

loadable extension ext/misc/fileio.c throws "undefined symbol sqlite3_sqlitefileio_init"

(1) By FrankL (frankl) on 2020-12-16 07:11:48 [link] [source]

The entry point

int sqlite3_fileio_init

does not fit the naming conventions as far as I understood the docs. After compiling the file with

gcc -fPIC -shared fileio.c -o libsqlitefileio.so

and loading the extension with .load the mentioned error occurs.

After renaming sqlite3_fileio_init to sqlite3_extension_init everything works fine.

Best regards

Frank

(2) By FrankL (frankl) on 2020-12-16 09:25:37 in reply to 1 [source]

Sorry, it suffices to rename the shared library to libfileio.so

Frank