On Sun, Apr 6, 2008 at 12:47 PM, wp <qwertygd@xxxxx> wrote: > Hi > I have installed gcc-4.0.1 in my mandriva2006 as default gcc compiler. (its > a an rpm package) > I compile and install another gcc (4.2.0 or 3.4.6) > I try change symlinks. I try change alternatives. Everything looks Ok. > when I type gcc -- version I have 4.2.0. But when I try rebuild surces by > rpmrebuild it's still use default gcc (4.0.1) and i have compilation error > (incompatible with gcc 4.0.1). > When I uninstall rpm package with gcc-4.0.1 everything works fine, > rpmrebuild goes without any error. But when I install gcc-4.0.1 again, then > it'is again default gcc and again can't rebuild my source. > My question is: How to change default gcc ? Did you try my suggestion to set the CXX and CC environment variables to the desired compilers? I use rpm build all the time and that seems to work for me. -Tom