I recommend against using the -V
flag to make multiple versions
of gcc/g++ co-exist, unless they are different minor releases that can use
the same compiled version of libg++. The reason is that all these
versions will try to use the same libg++ version, which usually will
not work.
Instead, use the --prefix
flag when configuring gcc. Use a
different value of --prefix
for each gcc version. Use the
same value of --prefix
when configuring libg++. You can then
have any number of co-existing gcc/libg++ pairs. Symbolic links can
be used so that users don't need to put all these different directories
on their paths.
One possible system to use is to set --prefix
to
`/usr/local/gcc-2.x.y' for version 2.x.y of gcc, and to link
whichever version of gcc you wish to be the default into
`/usr/local/bin/gcc' and `/usr/local/bin/g++'.