SQLite Forum

Enabling JSON1 extension in the sqlite3.c amalgamation at compile time
Login
Thank you. I apologize if my terms were not sufficiently precise where I wrote that I took the error "to mean" that the extension was not enabled. I should have written that I took the error "to be the result of" the extension having not been enabled. I know what the error means in itself but I don't understand why it is being returned.

I've assumed that enabling the extension also declares the functions for subsequent use in my code and, therefore, am asking whether or not the error is the result of the extension having not been enabled.

Am I misunderstanding that? Should not enabling the extension also declare the functions for use? Have I placed the files in the wrong order, such that the functions are being invoked before they have been declared?
 
The WHEN and WHERE are: 

I'm using minGW-W64 and at the run terminal I tried `gcc -DSQLITE_ENABLE_JSON1 -c sqlite3.c` and generated the `sqlite3.o` file without error; but, when that is compiled/linked with my code using `gcc sqlite3.o myfile.c -o myfile.exe`, the error I mentioned above is returned and the executable is not generated.

I tried what was suggeested above at the run terminal, which is `gcc -E sqlite3.c -DSQLITE_ENABLE_JSON1 >sqlite3.txt` and the result in that file, starting at the statement

`static const char * const sqlite3azCompileOpt[] = {`
`# 111 "sqlite3.c"`
`  "COMPILER=gcc-" "8.1.0",`
`# 279 "sqlite3.c"`
`  "ENABLE_JSON1",`
`# 748 "sqlite3.c"`
`  "THREADSAFE=1",`
`# 780 "sqlite3.c"`
`};`

appears to indicate that the request to enable the extension was recognized; but, for some reason, almost certainly something I am doing wrong, the functions are not being declared.

Thank you for your assistance.