SQLite Forum

compiling extensions for Windows x64 with mingw-w64
Login
All the time.  For simple compiles:

gcc -s -O3 -m32 -I/source/bld csv.c -o csv.dll  
gcc -s -O3 -m64 -I/source/bld csv.c -o csv.dll

for 32-bit or 64-bit respectively.  Headers are in /source/bld

If you want to enable the various available security features you have to do that on the command line since GCC/MinGW does not do that by default.

```
>gcc -s -O3 -m64 -mdll -I/source/bld csv.c -o csv.dll

>python
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> db = sqlite3.connect(':memory:')
>>> db.load_extension('csv.dll')
>>> ^Z
```