compiling v. 1.8.6 or 1.8.7 on Win7 with MinGW

Hello,

I'm trying to compile HDF v. 1.8.6 and 1.8.7 with MinGW (fortran enabled) on Windows 7 (x64). I could compile v. 1.8.6 on Windows XP (32 bit) and it worked fine, however on Windows 7 v. 1.8.6 'make check' stops while executing link.exe (link.exe just stops working):

Testing dangling external links make[4]: *** [links.chkexe_] Error 1

I was wondering if anybody knows what could be the solution?

Then I tried to compile v 1.8.7 on the Win7 and it doesn't succeed to compile vfd.exe with following error message:
vfd.c: In function 'test_windows':
vfd.c:1335:8: error: 'H5FD_WINDOWS' undeclared (first use in this function)
vfd.c:1335:8: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [vfd.o] Error 1

Any ideas?
Any help is highly appreciated!

Anja