不能编译通过ubuntu server 9.04
GCC 4.33
TcpServerClass.o: In function `__static_initialization_and_destruction_0(int, int)':
TcpServerClass.cpp:(.text+0x1d): undefined reference to `std::ios_base::Init::Init()'
TcpServerClass.cpp:(.text+0x22): undefined reference to `std::ios_base::Init::~Init()'
TcpServerClass.o: In function `TcpServer::handleEcho()':
TcpServerClass.cpp:(.text+0xbd): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0xd7): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0xdf): undefined reference to `__cxa_throw'
TcpServerClass.cpp:(.text+0x125): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x13f): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x147): undefined reference to `__cxa_throw'
TcpServerClass.o: In function `TcpServer::isAccept()':
TcpServerClass.cpp:(.text+0x1da): undefined reference to `std::cout'
TcpServerClass.cpp:(.text+0x1df): 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*)'
TcpServerClass.cpp:(.text+0x1eb): 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*)'
TcpServerClass.cpp:(.text+0x1fb): 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*)'
TcpServerClass.o: In function `TcpServer::TcpServer(int)':
TcpServerClass.cpp:(.text+0x24b): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x265): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x26d): undefined reference to `__cxa_throw'
TcpServerClass.cpp:(.text+0x2f3): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x30d): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x315): undefined reference to `__cxa_throw'
TcpServerClass.cpp:(.text+0x33d): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x357): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x35f): undefined reference to `__cxa_throw'
TcpServerClass.o: In function `TcpServer::TcpServer(int)':
TcpServerClass.cpp:(.text+0x3a3): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x3bd): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x3c5): undefined reference to `__cxa_throw'
TcpServerClass.cpp:(.text+0x44b): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x465): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x46d): undefined reference to `__cxa_throw'
TcpServerClass.cpp:(.text+0x495): undefined reference to `__cxa_allocate_exception'
TcpServerClass.cpp:(.text+0x4af): undefined reference to `typeinfo for char const*'
TcpServerClass.cpp:(.text+0x4b7): undefined reference to `__cxa_throw'
TcpServerClass.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0x1d): undefined reference to `std::ios_base::Init::Init()'
main.cpp:(.text+0x22): undefined reference to `std::ios_base::Init::~Init()'
main.o: In function `main':
main.cpp:(.text+0x11d): undefined reference to `__cxa_begin_catch'
main.cpp:(.text+0x148): undefined reference to `__cxa_end_catch'
main.o:(.gcc_except_table+0x18): undefined reference to `typeinfo for char const*'
main.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make: *** [main] Error 1
回复 更多评论