Skip to content

How to use APSW with other SQLite-using C extensions #424

Answered by rogerbinns
Nikratio asked this question in Q&A
Discussion options

You must be logged in to vote

You don't need to do anything special and it should all work. The only gotcha is that extension loading is off by default, and you need to enable it - eg with enableloadextension. It is also the case that the default compilation of SQLite has loadable extension functionality compiled out, but virtually everyone has the functionality compiled in.

Loadable extensions are not linked against SQLite. Instead the initialisation method of the extension is passed a list of function pointers. That guarantees the correct functions are used no matter how and when the extension was compiled, and even if SQLite is compiled in statically. You can see that here.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Nikratio
Comment options

Answer selected by rogerbinns
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants