https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118244 --- Comment #6 from Brecht Sanders <brechtsanders at users dot sourceforge.net> --- I tried building without '-D__USE_MINGW_ANSI_STDIO=0' and I still get the same undefined references.