If you use Dev-C++, you only need to add "-mwindow" to your compiler options, or set your project as a Win32 GUI project in the project options (which does the same).
This is the link error I faced when using Dev-C++ (4.9.8.1) with old Mingw/GCC 2.95...
You may want to try again with the latest version of Dev-C++ (4.9.8.1) AND the new Mingw/GCC 3.2 (just get the latest Dev-C++ download from bloodshed.net). This worked for me!