SQLite Forum

Using sqlite3_load_extension on windows
While experimenting with dlls I tried to create a source file that called each of the entry points in the extension files I required in order to save me having to create a dll for each extension. The dll source file starts with the lines

#include "eval.c"
#include "carray.c"
#include "series.c"
#include "btreeinfo.c"

but I get the error "redefinition of sqlite3_api" in each of the above files bar the first. If I comment out the


line in each of the bottom 3 files it all works fine but I can't help but feel I've transgressed some unwritten law. I have the same 4 includes at the bottom of my sqlite3.c amalgamation code before my core_init function and that compiles fine. Is there a reason I shouldn't be doing this and, if not, is there a #define I can put before the #includes that will suppress the redefinition errors so I can leave the extension source files untouched.