[CentOS] Re: More than 1 gcc version?

Rex Dieter rdieter at math.unl.edu
Mon Oct 24 15:51:59 UTC 2005

Tom Brown wrote:
>> you can get gcc-3.2.3 from the package compat-gcc-32
>> (yum install compat-gcc-32)
>> You can also try gcc-4.x from the package gcc4
> thanks - thats the version i know this will compile against. Any ideas 
> how to instruct the compiler to user this version of gcc rather than the 
>  default?

Most (sane) packages will use ENV vars CC CXX, so
export CC=gcc4
export CXX=g++4

before should hopefully work.

-- Rex

More information about the CentOS mailing list