On Tue, Apr 15, 2003 at 10:22:40AM -0400, Dave Phillips
wrote:
Nick's advice to upgrade my compiler is
timely (I'm using GCC 2.96 from
RH 7.2) but unfortunately I can't make the switch right now. If there's
an obvious (or non-obvious) solution to my dilemma I'd be happy to hear
of it.
Its possible to installed the redhat provided gcc3 alongside 2.96, you set
some environment variabel to set which one youre using. You have to make
sure that all the C++ it links against is built with the same compiler
ofcourse.
i find that a little unsafe for various emotional reasons. so i use
this script (having built gcc3 using ./configure --prefix=/usr/gcc3,
and created /usr/gcc2/bin to hold all my old gcc2.95 executables). i
switch back and forth as needed.
----------------------------------------------------------------------
#!/bin/bash
progs="c++ c++filt cpp gcc gcov i686-pc-linux-gnu-gcc protoize unprotoize
"
case $1 in
2) dir=/usr/gcc2/bin ;;
3) dir=/usr/gcc3/bin ;;
esac
for prog in $progs
do
rm -f /usr/bin/$prog
ln -s $dir/$prog /usr/bin
done
exit 0;