C++ compiling fails - Unix
This is a discussion on C++ compiling fails - Unix ; Hello all,
I am now working on an old RedHat 64bit system and this system could
compile "hello world" c program.
but when I tried to compile a C++ program, it fails.
========================================
jigsaw@pinar> g++ hello.cpp -o hello
In file ...
-
C++ compiling fails
Hello all,
I am now working on an old RedHat 64bit system and this system could
compile "hello world" c program.
but when I tried to compile a C++ program, it fails.
========================================
jigsaw@pinar> g++ hello.cpp -o hello
In file included from hello.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/
iostream:44:28: bits/c++config.h: No such file or directory
In file included from /usr/lib/gcc/x86_64-redhat-linux/
3.4.6/../../../../include/c++/3.4.6/ios:44,
from /usr/lib/gcc/x86_64-redhat-linux/
3.4.6/../../../../include/c++/3.4.6/ostream:45,
from /usr/lib/gcc/x86_64-redhat-linux/
3.4.6/../../../../include/c++/3.4.6/iostream:45,
=========================================
It seems that RH cannot find the right library for compiling.
Here is information about gcc and glibc
==========================================
jigsaw@pinar> rpm -qa | grep glibc
glibc-common-2.3.4-2.36
glibc-devel-2.3.4-2.36
glibc-2.3.4-2.36
glibc-headers-2.3.4-2.36
compat-glibc-headers-2.3.2-95.30
glibc-2.3.4-2.36
glibc-kernheaders-2.4-9.1.100.EL
glibc-devel-2.3.4-2.36
compat-glibc-2.3.2-95.30
jigsaw@pinar> rpm -qa | grep gcc
libgcc-3.4.6-8
gcc-java-3.4.6-8
libgcc-4.1.2-3
gcc-3.4.6-8
gcc-g77-3.4.6-8
compat-libgcc-296-2.96-132.7.2
libgcc-3.4.6-8
gcc-c++-3.4.6-8
=============================================
could anybody tell me which library I need to install?
Thanks in advance!
-
Re: C++ compiling fails
loudking wrote:
> Hello all,
>
> I am now working on an old RedHat 64bit system and this system could
> compile "hello world" c program.
>
> but when I tried to compile a C++ program, it fails.
>
> ========================================
> jigsaw@pinar> g++ hello.cpp -o hello
> In file included from hello.cpp:1:
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/
> iostream:44:28: bits/c++config.h: No such file or directory
> In file included from /usr/lib/gcc/x86_64-redhat-linux/
> 3.4.6/../../../../include/c++/3.4.6/ios:44,
> from /usr/lib/gcc/x86_64-redhat-linux/
> 3.4.6/../../../../include/c++/3.4.6/ostream:45,
> from /usr/lib/gcc/x86_64-redhat-linux/
> 3.4.6/../../../../include/c++/3.4.6/iostream:45,
> =========================================
> [...]
> could anybody tell me which library I need to install?
Try libstdc++ and libstdc++-devel