I believe there is a bug in your setup of the C++ part of gcc. I just did a custom install of Red Hat 5.2, and selected for installation all packages pertaining to C and C++ development. gcc worked when compiling .c files. However, when compiling .cc files, there was an error message, indicating that cc1plus could not be found. cc1plus and related executables are in /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29, but they aren't on the default PATH, nor are there any links to them on PATH. I fixed this by setting up some links in /usr/local/bin: [jao@zack jao]$ ls -l /usr/local/bin total 0 lrwxrwxrwx 1 root root 51 Apr 9 03:21 cc1 -> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cc1 lrwxrwxrwx 1 root root 55 Apr 9 03:23 cc1plus -> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cc1plus lrwxrwxrwx 1 root root 51 Apr 9 03:21 cpp -> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cpp Being new to Linux, I'm not sure this is the best solution, but it seems to work. I think you should fix your egcs-c++ installation to ensure that these executables are reachable from /usr/bin or /usr/local/bin. I'd also appreciate it if you could let me know if my fix is correct, or if there is something else more consistent with FSSTND. Thanks. Jack Orenstein
This appears to be an interesting consequence of RedHat 5.2's C++ compiler being egcs but the default 'gcc' being gcc-2.7.2.3. 'c++ -c foo.cc' and 'egcs -c foo.cc' both work, but 'gcc -c foo.cc' bombs out with this error, presumably because it's trying to use the 2.7.2.3 C++ compiler (not installed).
You should not be using gcc for c++; use egcs/c++ instead.