is it just me?! (linker troubles)

Petter Urkedal petter@matfys.lth.se
Wed Apr 26 02:19:00 GMT 2000


Gerhard Wesp wrote:
> 
>   no, it doesn't make much difference:
> 
> grisu% gcc -fhonor-std hello.cc
> /tmp/cc0Am9bg.o: In function `main':
> /tmp/cc0Am9bg.o(.text+0xf): undefined reference to `std::cout'
> /tmp/cc0Am9bg.o(.text+0x14): 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/cc0Am9bg.o: In function `__static_initialization_and_destruction_0':
> /tmp/cc0Am9bg.o(.text+0x46): undefined reference to `std::ios_base::Init::Init(void)'
> /tmp/cc0Am9bg.o(.text+0x5b): undefined reference to `std::ios_base::Init::~Init(void)'
> collect2: ld returned 1 exit status
> 
>   i'll try to bootstrap gcc with libstdc++ on a compaq alpha today.  perhaps
> it's a problem with the unstable debian distribution...

Try `g++' (gcc does not link -lstdc++ by default, AFAIK).  If that
fails, try to add `-L/usr/local/lib' or whichever is your install
library path.

Cheers,
 -petter.


More information about the Libstdc++ mailing list