There were also many undefined references reported prior to the error being reported.
Ok .. looks as though there might be a problem with your MinGW installation. Can you give us a copy'n'paste of some of those "undefined reference" messages - you should have got no such messages at all.