Compile sqlite3.dll with FOREIGN_KEYS=ON as default
(1) By anonymous on 2020-09-14 22:03:22 [link] [source]
How do I compile sqlite3.dll (Windows) with FOREIGN_KEYS=ON as default?
(2) By Keith Medcalf (kmedcalf) on 2020-09-14 22:19:57 in reply to 1 [link] [source]
However you are compiling sqlite3.dll define the symbol SQLITE_DEFAULT_FOREIGN_KEYS=1 when compiling sqlite3.c
Further detail requires further detail.
(3) By Keith Medcalf (kmedcalf) on 2020-09-14 22:23:08 in reply to 1 [link] [source]
https://sqlite.org/howtocompile.html might be helpful.
(4) By Keith Medcalf (kmedcalf) on 2020-09-14 22:35:31 in reply to 3 [source]
Note that the commands for compiling a Windows DLL are defective. You must specify at least the symbol SQLITE_API=__declspec(dllexport) in order to export the symbols from the resulting dll.
cl -DSQLITE_API=__declspec(dllexport) /LD sqlite3.c
gcc -DSQLITE_API=__declspec(dllexport) -mdll sqlite3.c -o sqlite3.dll
You can specify other options as required. As for the clickey-pokey, I have no clue since I despise clickey-pokeys. Note that how you get an appropriate .lib or .a trampoline generated also varies by toolchain.