Notes on Python compiled with MinGW-w64

Notes on Python compiled with MinGW-w64#

Python.org releases binaries compiled with Microsoft Visual C++ (MSVC) - see Using Microsoft Visual C with Python.

The MSVC runtimes are not compatible one with another. That means, that if Python is compiled with version X of MSVC, then you will have to compile all your extension with that same version X, in order to use the same run-time.

MinGW-w64 links against MSVCRT.DLL. Quoting from https://nicessgg.wordpress.com/2011/08/23/c-run-time-libraries/

What is the difference between msvcrt.dll and msvcr80.dll?

The msvcrt.dll is now a “known DLL,” meaning that it is a system component owned and built by Windows. It is intended for future use only by system-level components.

See also MSVCRT notes. MinGW-w64 also has its own C runtime for functions not available in MSVCRT.DLL.

In the past, the CPython has resisted supporting MinGW compilation of Python:

The MSYS2 project provides patched Python builds (patches for Python 2 and Python 3).