0
votes

I am trying to load an extension in sqlite3. I managed to compile the extension using : clang -bundle -fPIC -Isqlite3 -o .sqlext .c However, I cannot seem to load the extension .load Error: unknown command or invalid arguments: "load". Enter ".help" for help

And when I type .help, I cannot see .load.

I have also tried to enable extensions int sqlite3_enable_load_extension(sqlite3 *db, int onoff==1); Error: near "int": syntax error

I would really appreciate a step by step instruction on how to enable extensions in sqlite?

Thanks!

1

1 Answers

1
votes

Most likely your sqlite compiled with SQLITE_OMIT_LOAD_EXTENSION. Get the one build without this flag, or build it yourself.

You cannot use sqlite3_enable_load_extension from SQL, it is sqlite's C API.