This content has been marked as final. Show 2 replies
First, I hope you realize that Centos is not a supported OS. Only Solaris, OEL, and RHEL are supported.
The compiler uses some heuristics to find the default installed version of gcc. There is currently no option to tell it to look in a specific place, or to pick one of multiple installed versions. In addition, we test only with the default versions of gcc on the supported platforms, so a different gcc version might not work well. (Considerable work is usually needed to get Studio to work with new Linux versions and new gcc versions.)
You can usually force a specific version of gcc by adding -I and -L options. The compiler will look in those directories before looking in the default directories. You would also need to set the runpath for shared libraries and executables to pick up the right gcc libraries.
Moving (renaming) the top-level gcc directories you want to avoid will work if the one you want is in a usual place.
Both of these workarounds are hacks to some degree, and might not be sustainable.
The moving/renaming of directories was just part of the investigative process and not intended as a reasonable workaround.
The forced includes and library search directories is enough of a workaround.
RHEL6.3 ships the same version, 4.6.6, but we use CentOS 6.3 instead, since it tracks RHEL well enough.