SQLite Forum

Help Compiling SQLite for UWP ARM64
Login
After taking a look at the amalgamation source, and considering your stated problem more carefully, I have come to believe my advice is not what you needed. (It would be if a few API entry points were missing, but I think that is not the case here.)

Your problem is simple, and has resulted in all SQLite API entry points being not exported in your DLL.  

Without recommending that you use what follows, here is what a modified version of Makefile.msc causes nmake to do to build a sqlite3.dll:<code>
	cl -nologo -W4 -DINCLUDE_MSVC_H=1   -DSQLITE_OS_WIN=1 -I. -I. -fp:precise -MD -DNDEBUG -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_TEMP_STORE=2  -DSQLITE_MAX_TRIGGER_DEPTH=100 -DSQLITE_DQS=0 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DEFAULT_FOREIGN_KEYS=1 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_USE_URI -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_USE_ALLOCA -DSQLITE_DEFAULT_SYNCHRONOUS=3 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_REPLACE_INVALID_UTF -DSQLITE_DEFAULT_WORKER_THREADS=3   -Os -favor:blend -Fosqlite3.lo -Fdsqlite3.pdb  -DSQLITE_API=__declspec(dllexport) -c sqlite3.c
	echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
	echo #define SQLITE_RESOURCE_VERSION          3,32,2 >> sqlite3rc.h
	echo #endif >> sqlite3rc.h
	rc -DSQLITE_OS_WIN=1 -I. -I.   -DNDEBUG -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_TEMP_STORE=2  -DSQLITE_MAX_TRIGGER_DEPTH=100 -DSQLITE_DQS=0 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DEFAULT_FOREIGN_KEYS=1 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_USE_URI -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_USE_ALLOCA -DSQLITE_DEFAULT_SYNCHRONOUS=3 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_REPLACE_INVALID_UTF -DSQLITE_DEFAULT_WORKER_THREADS=3   -r -fo sqlite3res.lo .\\sqlite3.rc
	link.exe ..\\..\\zlib-1.2.11\\contrib\\vstudio\\vc14\\x64\\ZlibDllRelease\\zlibwapi.lib  /INCREMENTAL:NO /NOLOGO /MACHINE:x64  /DLL  /OUT:sqlite3.dll sqlite3.lo sqlite3res.lo  
</code>

There is a lot there, some of which you likely need or want and some not. However, this compilation flag,<code>
   -DSQLITE_API=__declspec(dllexport)
</code>is quite important for ultimately getting a useful DLL.  It causes the token, SQLITE_API, found on all SQLite exposed API definitions, to be substituted with a qualifier that tells the compiler to mark that name so that it ends up being among the exported symbols of the finally linked DLL. This can be seen in the following partial session screen scrape:<code>
\> dumpbin /exports sqlite3.dll | findstr libversion
        119   76 00001020 sqlite3_libversion
        120   77 00001040 sqlite3_libversion_number
\>
</code>

I think, at your stage of developer development, that you might want to try using the Makefile.msc that comes with the amalgamation rather than rolling your own CL and LINK invocations.  At the very least, you will benefit from studying that makefile.