I have been a Cygwin user since its infancy, and I have been looking for a way to build SQLite Windows DLL with Cygwin, and I just found how to do this. I know I can use MinGW, which is the way I was doing it, but if you have Cygwin, you can just follow this steps:
1. use your setup to get the basic MinGW Cygwin libraries and utilities
Install mingw64-i686-gcc-core 7.4.0-1
Install mingw64-i686-gcc-g++ 7.4.0-1
or the 64 bit version, if you are going to build the 64b.
2. download the sqlite3 amalgation
4. run this command,
$ i686-w64-mingw32-gcc -shared -static-libgcc sqlite3.c -o sqlite3.dll
$ ls -l sqlite3.dll
-rwxr-xr-x 1 jcabrera None 1.1M Jun 10 22:38 sqlite3.dll*
And that's it. Just thought I'd share this for the Cygwin users. Thanks.