Patches needed to build on mingw32 include http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00009.html and http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00097.html . The first one contains the fix to your problem, the second one is the latest version of the patch to fix dllimport.
However, on mingw32, this is not enough to build (see PR 23210, for example). FX