linux eclipse C++编译报错如何解决请求高手

南华 2016-03-09 12:58:33
/usr/lib/gcc/i686-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
./src/sm_pubfunc.o:/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:948: more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' follow
./src/sm_pubfunc.o: In function `CSMPubFunc::GetDevicesUnderControlSQL()':
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:948: undefined reference to `std::allocator<char>::~allocator()'
./src/tinyxmlparser.o:(.rodata._ZTI14TiXmlAttribute[typeinfo for TiXmlAttribute]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::~allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::~allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::~allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::~allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::allocator<char>::allocator()'
/root/workspace/test/I2DataMgr/Debug/../src/sm_pubfunc.cpp:1061: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'

./src/tinyxml.o:(.rodata._ZTV9TiXmlBase[vtable for TiXmlBase]+0x14): more undefined references to `__cxa_pure_virtual' follow
./src/tinyxml.o:(.rodata._ZTI12TiXmlUnknown[typeinfo for TiXmlUnknown]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./src/tinyxml.o:(.rodata._ZTI16TiXmlDeclaration[typeinfo for TiXmlDeclaration]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./src/tinyxml.o:(.rodata._ZTI9TiXmlText[typeinfo for TiXmlText]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./src/tinyxml.o:(.rodata._ZTI12TiXmlComment[typeinfo for TiXmlComment]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./src/tinyxml.o:(.rodata._ZTI12TiXmlElement[typeinfo for TiXmlElement]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./src/tinyxml.o:(.rodata._ZTI9TiXmlNode[typeinfo for TiXmlNode]+0x0): more undefined references to `vtable for __cxxabiv1::__si_class_type_info' follow
./src/tinyxml.o:(.rodata._ZTI9TiXmlBase[typeinfo for TiXmlBase]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
./src/tinyxmlparser.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
./src/tinyxmlparser.o:(.eh_frame+0x457): undefined reference to `__gxx_personality_v0'
collect2: ld 返回 1
make: *** [I2DataMgr] 错误 1
...全文
253 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
SongDongmei 2016-03-11
  • 打赏
  • 举报
回复
你是在PowerLinux平台上编译的吗?看你代码应该是for x86的。

742

社区成员

发帖
与我相关
我的任务
社区描述
该论坛主要探讨Linux系统在IBM Power平台的安装、部署、应用开发等话题,并为网友们提供自由交流的平台。
社区管理员
  • Power Linux社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧