- 论坛徽章:
- 0
|
一个很简单的例子
- # cat test.cc
- #include <iostream>;
- int main(int argc, char **argv)
- {
- std::cout<<"Hello\n";
- return 0;
- }
- #g++ test.cc
- ld: 0711-317 ERROR: Undefined symbol: .std::basic_ostream<char, std::char_traits<char>; >;& std::operator<< <std::char_traits<char>; >;(std::basic_ostream<char, std::char_traits<char>; >;&, char const*)
- ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::Init[in-charge]()
- ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::~Init [in-charge]()
- ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
- ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
- collect2: ld returned 8 exit status
复制代码
gcc 是我自己编译的
# gcc -v
Reading specs from /usr/gcc3.3/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.3.3/specs
Configured with: ./configure --prefix=/usr/gcc3.3 --disable-nls
Thread model: aix
gcc version 3.3.3
哪位指教,谢谢! |
|