The function fwide always fails on mingw (mea culpa). It shouldn't, because (1) wide streams are supported and (2) fwide doesn't need to do anything to allow support.
gcc/libstdc++-v3/testsuite/27_io/wchar)t/9662.cc exposes the bug.
2008-04-25 Danny Smith <firstname.lastname@example.org>
\* include/wchar.h \(fwide\): Return success code rather than failure in inline definition, \* mingwex/fwide.c \(fwide\): ANSI-fy. Get rid of Q8 comments. Return success code rather than failure.