http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
--- Comment #56 from Dave Korn <davek at gcc dot gnu.org> 2011-04-07 15:15:14 UTC --- What works for me on Cygwin, and so may well also work for anyone using MSYS, is setting the heap_chunk_in_mb registry parameter to some value in the range 1024 - 1536. I use 1024 myself and that gives me sufficient headroom to link libgcj dll, which is huge; if it works for that, it's likely to help with wx dll as well. http://cygwin.com/cygwin-ug-net/setup-maxmem.html