error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I build a native C++ compiler - version 4.1.1.
I then tried to execute a simple hello world C++ program.

when compiled with g++,
it gives me the following error:

./a.out: error while loading shared libraries: libstdc++.so.6: cannot
open shared object file: No such file or directory

but when i use the command line driver $gcc 1.cpp
i get the following errors.

/tmp/cc2wk6Uk.o(.text+0x23): In function `__static_initialization_and_destructio
n_0(int, int)':
: undefined reference to `std::ios_base::Init::Init()'
/tmp/cc2wk6Uk.o(.text+0x3e): In function `__static_initialization_and_destructio
n_0(int, int)':
: undefined reference to `std::ios_base::Init::~Init()'
/tmp/cc2wk6Uk.o(.text+0x90): In function `main':
: undefined reference to `std::cout'
/tmp/cc2wk6Uk.o(.text+0x95): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std
::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits
<char> >&, char const*)'
/tmp/cc2wk6Uk.o(.text+0x9d): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std
::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<
char> >&)'
/tmp/cc2wk6Uk.o(.text+0xa5): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::ope
rator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostrea
m<char, std::char_traits<char> >&))'
/tmp/cc2wk6Uk.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status


I did not have anyproblems while building the compiler.

Can any one tell me where i am going wrong!!!

Regards,
Rohit

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux