免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3261 | 回复: 0
打印 上一主题 下一主题

C++编译问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-05 22:14 |只看该作者 |倒序浏览
第一次在unix下写C++程序:\r\n#include<iostream>\r\nusing namespace std;\r\n\r\nint main()\r\n{\r\n  cout<<\"HelloWorld\"<<endl;\r\n  return(0);\r\n}\r\n就是上面的最简单的HelloWorld程序,用cc -c hello.cpp没有错误,但cc -o hello hello.cpp就报错了\r\nld: 0711-317 ERROR: Undefined symbol: Virtual table for class \"__DynaCastDesc_si_public\": first non-inline virtual function in \"__DynaCastDesc_si_public\" is not defined.\r\nld: 0711-317 ERROR: Undefined symbol: Virtual table for class \"eti_cplusplus\": first non-inline virtual function in \"eti_cplusplus\" is not defined.\r\nld: 0711-317 ERROR: Undefined symbol: operator delete(void*)\r\nld: 0711-317 ERROR: Undefined symbol: std::cout\r\nld: 0711-317 ERROR: Undefined symbol: .std::__setUncaughtExceptionFlag(bool)\r\nld: 0711-317 ERROR: Undefined symbol: .__CleanupCatch\r\nld: 0711-317 ERROR: Undefined symbol: .std::_Lockit::_Lockit(int)\r\nld: 0711-317 ERROR: Undefined symbol: .std::uncaught_exception()\r\nld: 0711-317 ERROR: Undefined symbol: .std::_Lockit::~_Lockit()\r\nld: 0711-317 ERROR: Undefined symbol: .operator delete(void*)\r\nld: 0711-317 ERROR: Undefined symbol: .std::ios_base::clear(int,bool)\r\nld: 0711-317 ERROR: Undefined symbol: std::ctype<char>::id\r\nld: 0711-317 ERROR: Undefined symbol: .std::locale::_Getfacet(unsigned long) const\r\nld: 0711-317 ERROR: Undefined symbol: .__Throw\r\nld: 0711-317 ERROR: Undefined symbol: .std::unexpected()\r\nld: 0711-317 ERROR: Undefined symbol: .std::terminate()\r\nld: 0711-317 ERROR: Undefined symbol: .__ReThrow\r\nld: 0711-317 ERROR: Undefined symbol: std::locale::id::_Id_cnt\r\nld: 0711-317 ERROR: Undefined symbol: .operator new(unsigned long)\r\nld: 0711-317 ERROR: Undefined symbol: .std::_Locinfo::_Locinfo(const char*)\r\nld: 0711-317 ERROR: Undefined symbol: .std::_Locinfo::~_Locinfo()\r\nld: 0711-317 ERROR: Undefined symbol: std::ctype<char>::_Cltab\r\nld: 0711-317 ERROR: Undefined symbol: ._Getctype\r\nld: 0711-317 ERROR: Undefined symbol: ._Tolower\r\nld: 0711-317 ERROR: Undefined symbol: ._Toupper\r\nld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.\r\n估计是连接库的问题\r\n我在RH9下用cc -o hello hello.cpp -lstdc++是可以的,但在AIX下又不行,不知道要连接什么库
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP