C++ Eclipse CDT How to add gcc 4.6.3

c++eclipseeclipse-cdtgccgnu

I am running Eclipse CDT in Redhat Enterprise, the default version of gcc compiler is 4.4.6. The support team added gcc 4.6.3 recently, I am wondering how can I set up Eclipse in such a way that I can choose to compile the application with either gcc 4.4.6 or 4.6.3.

Thanks.

Best Solution

If you really want both gcc 4.6 and 4.4 in your eclipse, you will have to adjust your build configurations (as far I know there is no "easy" way to do this by default).

Project -> Properties -> C/C+++ Build -> Manage Configurations -> create new

Once this is created (& selected) you set it just like other configurations in tree (Debug / Release).

new_configuration > Discovery -> Compiler invocation command --> set path to gcc 4.6

I believe you have to do this per each project, Eclipse is sloppy in this area.