For the root cause is the sqlite3.dll download from official is not the release version, so you need to rebuild it by youself.
5. Building A Windows DLL
To build a DLL of SQLite for use in Windows, first acquire the appropriate amalgamated source code files, sqlite3.c and sqlite3.h. These can either be downloaded from the SQLite website or custom generated from sources as shown above.
With source code files in the working directory, a DLL can be generated using MSVC with the following command:
cl sqlite3.c -link -dll -out:sqlite3.dll
The above command should be run from the MSVC Native Tools Command Prompt. If you have MSVC installed on your machine, you probably have multiple versions of this Command Prompt, for native builds for x86 and x64, and possibly also for cross-compiling to ARM. Use the appropriate Command Prompt depending on the desired DLL.
If using the MinGW compiler, the command-line is this:
gcc -shared sqlite3.c -o sqlite3.dll
Note that MinGW generates 32-bit DLLs only. There is a separate MinGW64 project that can be used to generate 64-bit DLLs. Presumably the command-line syntax is similar. Also note that recent versions of MSVC generate DLLs that will not work on WinXP and earlier versions of Windows. So for maximum compatibility of your generated DLL, MinGW is recommended. A good rule-of-thumb is to generate 32-bit DLLs using MinGW and 64-bit DLLs using MSVC.
In most cases, you will want to supplement the basic commands above with compile-time options appropriate for your application. Commonly used compile-time options include:
-
-Os - Optimize for size. Make the DLL as small as possible.
-
-O2 - Optimize for speed. This will make the DLL larger by unrolling loops and inlining functions.
-
-DSQLITE_ENABLE_FTS4 - Include the full-text search engine code in SQLite.
-
-DSQLITE_ENABLE_RTREE - Include the R-Tree extension.
-
-DSQLITE_ENABLE_COLUMN_METADATA - This enables some extra APIs that are required by some common systems, including Ruby-on-Rails.
Other issue please refer to my blog: https://blog.csdn.net/MissLong/article/details/82752512