I run gcc 3.2.1 r7 and installed the r8 version of 2.95.3 parallel to it in order to be able to switch between gcc 2.9x and 3.2.x. After having done the job I desired to switch back to gcc 3.2.x with gcc-config --use-old but the result was a mess. You can see a compile output of a gtkmm project which worked fine _before_ I installed the 2.9x gcc. I didn't compile any libs with the old compiler - I just installed it i.o. to use it for one goal. Look at http://freebits.de/errors.txt - I'm quite helpless on how to cope with the problem.
bash-2.05b# emerge info Portage 2.0.46-r9 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r3) ================================================================= System uname: 2.4.19-gentoo-r5 i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/kde/3.1/share/config:/usr/kde/3/share/config:/usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="tetex tcltk perl x86 3dnow aalib bonobo apm arts alsa avi berkdb cdr dga dvd esd gd crypt cups encode gdbm gif gpm gtk imlib gtk2 gtkhtml guile java jpeg kde gnome libg++ libwww mikmod mmx mozilla mysql motif mpeg ncurses nls oggvorbis oss slang tiff xml opengl pam pdflib png python qt qtmt quicktime readline sdl lang spell ssl svga tcpd truetype X xml2 xmms xv zlib" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-O2 -mcpu=i686 -pipe" CXXFLAGS="" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
I am not sure that this is the problem, but you should not use --use-old. That is basically a switch for portage, that if you have say 3.2.1 as default, and then install 2.95.3, that when it runs gcc-config, it should not change the profile if already set .... You should rather just do: # gcc-config i686-pc-linux-gnu-3.2.1 Also, please check, you do not have CXXFLAGS set ....
I played around with some things and have covered that Anjuta 1.0.1 was the problem. I think that some Flags where not set correctly so that the project didn't compile any more. It's strange that switching influences Anjuta but if you say that that switching shouldn't be done manually... Nevertheless the problem is solved and all works fine now.
Well, if its a C++ project, you are going to run into problems if you link say a gcc2 libs against gcc3 ones ...