Changing from gcc/g++-3.3 to 3.4 on Warty
Matt Zimmerman
mdz at canonical.com
Mon Jan 10 01:56:34 UTC 2005
On Sun, Jan 09, 2005 at 04:33:00PM -0800, Charlie Zender wrote:
> I am running Warty Warthog on a pentium 4 laptop.
> I want to change my default compiler (the one I use to compile
> my userland C/C++ programs) from gcc/g++-3.3 to gcc/g++-3.4.
> I installed the appropriate packages gcc/g++-3.4 packages.
> Now I want to change all the generic links so that e.g.,
> /usr/bin/gcc points to /usr/bin/gcc-3.4 instead of /usr/bin/gcc-3.3.
>
> There are many such links so I was wondering, is there an automated
> way to do this? If not, it would be helpful if this capability were
> added to the dpkg-reconfigure capability of gcc/g++ packages, i.e.,
> have the package ask during install if you wish them to be the default
> compiler. Doing it by hand seems prone to error and hard to reverse.
The only correct way to do this is to install newer versions of the 'gcc'
and 'g++' packages.
In general, it is simpler to set the 'CC', 'CXX', etc. environment
variables, as these are honored by well-behaved build systems to select an
alternate compiler.
--
- mdz
More information about the ubuntu-users
mailing list