SQLite Forum

compiling extensions for Windows x64 with mingw-w64
Login
Note that I usually use the following flags for 32 and 64 bit builds to "turn on" all the Windows Security features such as nx and ASLR.

-m32 -mdll -mthreads -Wl,-Bstatic,--nxcompat,--dynamicbase,--large-address-aware,--image-base,0x10000000 -static-libgcc

-m64 -mdll -mthreads -Wl,-Bstatic,--nxcompat,--dynamicbase,--high-entropy-va,--image-base,0x180000000 -static-libgcc

in addition to such things as -s (strip) -On (optimization) -pipe etc.