IBM AIX: ERROR: Undefined symbol basic_ostream

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

 



I can compile a hello world program. 
$> cat hello.cc 
#include <iostream> 

int main(int argc, char *argv[]) 
{ 
  printf("Hello, world!\n"); 
  std::cout << "Hello, world!\n"; 
} 

$> g++ -c hello.cc 

$> ls -l hello.o 
-rw-r--r-- 1 xxxxxxxx xxxxxxx 2528 11 Dec 12:23
hello.o 

I can't link the hello world program. 

$> g++ -o hello hello.o 

throws me this error, 

ld: 0711-317 ERROR: Undefined symbol:
.std::basic_ostream<char, std::char_traits<char> >&
std::opera 
tor<< <std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
char const*) 
ld: 0711-345 Use the -bloadmap or -bnoquiet option to
obtain more information. 
collect2: ld returned 8 exit status 

I am using following gcc version, 

gcc version 4.0.0 

I am on AIX5.3 box and "ld" version is LD 1.64
(08/19/2003)

I do have libstdc++.a present in my system and I even
tried building linking the library as, 

$> g++ -o hello hello.o -L/usr/lib -lstdc++ 

but eventually it gives me the same error. 

Help from anyone would be appreciated.

Kaushik

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[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