The code that writes matrices and textfiles to FILE* pointers passed from Python is not correct on Windows, due to different FILE* structures used by MinGW GCC and Python-for-Windows, which is built with MSVC.