Hello, Please help me to install new gcc. There are some strange differences, where standard gcc and gcc from RedHat linux expect to find their parts. After installation of gcc-2.95.2 on PC running RedHat Linux 5.0, (I copyed standard gcc-2.95.2 from a gnu site, not prepared rpms of RedHat) I got the following bulky messages while compiling programs: g++ -c -O -DHAVE_CONFIG_H -I../.. -I./../.. -I.. testRandom.cc find . -name *.obj -print | xargs -i _base_name {} .obj | xargs -i mv {}.obj {}.o g++ -O -DHAVE_CONFIG_H -I../.. -I./../.. -I.. -o testRandom testRandom.o ../libCLHEP-g++.a -lnsl -lm testRandom.o: In function `init(void)': testRandom.o(.text+0x1b): undefined reference to `HepRandom virtual table' testRandom.o: In function `dist_layout(void)': testRandom.o(.text+0xae8): undefined reference to `RandFlat virtual table' testRandom.o(.text+0xb57): undefined reference to `RandExponential virtual table' testRandom.o(.text+0xb9a): undefined reference to `RandGauss virtual table' testRandom.o(.text+0xc0c): undefined reference to `RandBreitWigner virtual table' testRandom.o(.text+0xc58): undefined reference to `RandPoisson virtual table' testRandom.o(.text+0xcef): undefined reference to `RandBinomial virtual table' testRandom.o(.text+0xd31): undefined reference to `RandChiSquare virtual table' testRandom.o(.text+0xd74): undefined reference to `RandGamma virtual table' testRandom.o(.text+0xdcb): undefined reference to `RandStudentT virtual table' ../libCLHEP-g++.a(DRand48Engine.o): In function `DRand48Engine:

aveStatus(char../libCLHEP-g++.a(DRand48Engine.o): In function `DRand48Engine:

aveStatus(char const *) const': DRand48Engine.o(.text+0x2c9): undefined reference to `ios virtual table' DRand48Engine.o(.text+0x323): undefined reference to `ostream::ios virtual table' DRand48Engine.o(.text+0x328): undefined reference to `ostream::ios virtual table' DRand48Engine.o(.text+0x333): undefined reference to `ostream::ios virtual table' DRand48Engine.o(.text+0x33e): undefined reference to `ostream::ios virtual table' DRand48Engine.o(.text+0x346): undefined reference to `ostream::ios virtual table' ../libCLHEP-g++.a(DRand48Engine.o)(.text+0x368): more undefined references to `ostream::ios virtual table' follow ../libCLHEP-g++.a(DRand48Engine.o): In function `DRand48Engine:

aveStatus(char const *) const': DRand48Engine.o(.text+0x379): undefined reference to `ofstream::ios virtual table' ../libCLHEP-g++.a(DRand48Engine.o): In function `DRand48Engine::restoreStatus(char const *)': DRand48Engine.o(.text+0x446): undefined reference to `ios virtual table' DRand48Engine.o(.text+0x49d): undefined reference to `istream::ios virtual table' DRand48Engine.o(.text+0x4a2): undefined reference to `istream::ios virtual table and so on. This was attempt to compile CLHEP. There is a listing from _link_ing of another program: /tmp/ccftc01Y.o: In function `DinLinArr<manip_absvol *::operator=(DinLinArr<manip_absvol * const &)': /home/igor/p98/wcpplib/util/FunNameStack.ic:35: undefined reference to `sqrt' /home/igor/p98/wcpplib/libgeom.a(vec.o): In function `cos2vec(vec const &, vec const &)': /home/igor/p98/wcpplib/geometry/vec.c:104: undefined reference to `sqrt' /home/igor/p98/wcpplib/libgeom.a(vec.o): In function `ang2vec(vec const &, vec const &)': /home/igor/p98/wcpplib/geometry/vec.c:121: undefined reference to `asin' /home/igor/p98/wcpplib/geometry/vec.c:122: undefined reference to `asin' /home/igor/p98/wcpplib/geometry/vec.c:126: undefined reference to `acos' /home/igor/p98/wcpplib/libgeom.a(vec.o): In function `sin2vec(vec const &, vec const &)': /home/igor/p98/wcpplib/geometry/vec.c:137: undefined reference to `sqrt' /home/igor/p98/wcpplib/libgeom.a(vec.o): In function `vec::turn_new(vec const &, double)': /home/igor/p98/wcpplib/geometry/vec.c:238: undefined reference to `sin' /home/igor/p98/wcpplib/geometry/vec.c:239: undefined reference to `cos' and so on. I installed gcc in directories recommended by standard manual, /usr/local/... which differs from what comes with RedHat gcc. Thus, I found executables in /usr/local/bin and some more various files in /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/include /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/include/asm /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/include/gnu /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/include/objc /usr/local/include/g++-3 I removed from /usr/bin all files with names similar to those in /usr/local/bin. I ensured that /usr/local/bin is in PATH. What have I done wrong? Can I fix the problem and avoid copying and installing the RedHat version of gcc (what takes long time with my Internet connection) ? Thanks in advance! Igor