Max. You are free to export your code differently by preprocessor
directives.  One binary of your code can be an extension and another can be
an ordinary library.  The loadable version binary simply needs to export a
working sqlite3_extension_init() C entrypoint as described here:

Here is another reply about reusing code between a SQLite server and client
that should give you some ideas:


On Thu, Apr 5, 2018 at 8:23 AM, Max Vlasov <> wrote:

> Hi,
> I'm considering creating a virtual table or user function that might
> possible work either as a loadable extension or as a general, statically
> created one. In order to avoid repeating during developing, I thought that
> I might use sqlite3_api_routines structure as a universal access to sqlite
> code routines in both cases. But it seems it is impossible to access the
> structure outside of a loadable extension context. Or am I missing
> something?
> Probably some direct access to sqlite3Apis variable is possible, but I
> suspect such practice isn't  recommended.
> Thanks
> _______________________________________________
> sqlite-users mailing list
sqlite-users mailing list

Reply via email to