I'd suspect this to be a problem with the MinGW installation. You said you tried two different versions of MinGW. Which version of MinGW is this? I never had problems with the version of MinGW downloaded by the Qt installer. What environment variables are you actually setting when you say that you're setting them "correctly"?
Bookmarks