From doc/build_win.txt
currently, the supported compilers [, under windows,] for building Mahogany are MS Visual C++ 7.1 and cygwin.
I can help you to get past some problems, but it may be a lot of problems and it still maybe won't work using MinGW GCC.
Please turn on Compiler Logging.
Post the command causing the error and I might be able to help you find the cause.
Steps to turn on Compiler Logging:
"Settings" -> "compiler debugger"
Change "Compiler Settings" to "Other Settings"
Set "Compiler Logging" to "Full Command Line"
Tim S