This is needed for Dota 2 Tools. The dll exists as a system dll on Windows since Win10. The source code is shipped in zip files at https://sqlite.org/download.html . The license seem to permit anything, including relicensing modifed code under LGPL. A most simple way to build it is to use distributed "amalgamation" source. That is the source preprocessed into a single file which contains all the possible options under #ifdef's. The inconvinience that the source (either most original, before preprocessing, or amalgamation) is not very well suited for building with calling \__stdcall calling convention (as it is built for Windows), the exported functions don't have SQLITE_APICALL attribute at definition. The full source distribution includes Makefile.msc which builds that on Windows with \\\_\\\_stdcall. It has some fixup (regexp base) to add missing attribute _somewhere_ but it is incomplete. In reality that build relies on /Gz MSVC compiler option which makes all non-vararg functions stdcall by default. There is equivalent -mrtd gcc / clang option but that didn't work well for me: on gcc / clang build that also affects msvcrt system functions, as well there are other remaining warnings. Fixing all that using regular expressions looks very messy: there are all possible places where that should be fixed up to avoid wrong calling convention or warnings: function declarations, type casts, functions pointers passed in parameters, function pointers in structures, function pointers in local variables. Naive attempts to do that also start "fixing" hardcoded SQL constructs like "SELECT (\\\*)...", so that would need very accurate checks which is not quite easy with thousands of changes. So I made a python script which uses libclang to parse the source code and fix up more precisely. As a bonus, it also generates .spec file using extracted argument types avoiding the need to do that manually for hundreds of exports. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10772#note_138107