I'm trying to install GCC 4.7.2 for windows and linux but I can't seem to do. Anybody know how I can do that. I have eclipse Juno
On linux, I used a tutorial a few days ago for ubuntu:
Currently, MinGW has version 4.7.0. There is also the TDM-GCC distribution, which is a bit more up-stream at version 4.7.1. As far as I know, there are not too many differences between 4.7.0 to 4.7.2, so you'd probably be ok with either ones. This is probably easier to live with that 6-months lag than trying to build GCC from source on Windows.
On Linux, if you have the latest ubuntu distribution 12.10 (or any sister distro), then you will find 4.7.2 in the official repositories. Otherwise, I'm sure you can find a PPA repository that carries it, or hook to upstream repositories. But this kind of depends on your distro. Personally, I keep a rolling build of GCC hooked to the svn repository. Building the complete GCC suite takes a couple of hours on a decent machine, and the process is a breeze in Linux (just checkout the svn repo, and enter a few commands to configure-build-install it, you just have to wait a little while). I update and rebuild about every month or so.
Just a warning, if you use Boost libraries, make sure you use version 1.49 or later, because earlier versions don't work with g++ 4.7.* compilers due to some technical detail in the defaulting of move- and copy-constructors.