Advertisement

01.15.2005 at 04:20AM PST, ID: 21275646
[x]
Attachment Details

Upgrade default gcc version in redhat 7.2

Asked by sarah81 in Linux Programming

Tags: gcc, redhat, default, upgrade, version

I have recently installed a full installation of redhat 7.2.

gcc -v shows:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)


whereas gcc3 -v shows:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux
Thread model: posix
gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)


rpm -qa | grep "c++" gives:

libstdc++3-devel-3.0.1-3
gcc-c++-2.96-98
libstdc++3-3.0.1-3
libstdc++-2.96-98
libstdc++-devel-2.96-98
gcc3-c++-3.0.1-3

This means that though both gcc2.96 and gcc3  are installed, gcc 2.96 is set as the default version.

I want all gcc 3 to be set as my default compiler. Thats if running gcc, g++ and c++, all should invoke the version 3 compiler and not the 2.96 one.

How can I do that? I tried removing both gcc packages and then reinstalling on gcc 3, but that didnt install g++ and c++.

To got those executables I had to re-install gcc 2.96. Why?

What should I do?

Thanks in advance,
Sarah.

Start Free Trial
[+][-]01.15.2005 at 08:40AM PST, ID: 13053512

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.15.2005 at 10:30PM PST, ID: 13056020

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Programming
Tags: gcc, redhat, default, upgrade, version
Sign Up Now!
Solution Provided By: wesly_chen
Participating Experts: 2
Solution Grade: B
 
 
[+][-]01.16.2005 at 06:09AM PST, ID: 13056929

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32