免费注册 查看新帖 |

Chinaunix

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

刚刚编译完boost_1.41.0版本,然后编译下面连接的例子出现了错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-21 21:47 |只看该作者 |倒序浏览
我刚刚编译完boost_1.41.0版本,然后编译下面连接的例子出现了错误   
timer5
http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/tutorial/tuttimer5/src.html

出现的错误是:
[root@ctfo test]# g++ timer5.cpp -I/usr/local/include -lboost_system -lboost_thread -lboost_signals -o timer5
/tmp/cc7VG8KC.o: In function `boost::mutex::mutex()':
timer5.cpp.text._ZN5boost5mutexC1Ev[boost::mutex::mutex()]+0x44): undefined reference to `boost::thread_resource_error::thread_resource_error()'
/tmp/cc7VG8KC.o: In function `boost::condition_variable::condition_variable()':
timer5.cpp.text._ZN5boost18condition_variableC1Ev[boost::condition_variable::condition_variable()]+0x39): undefined reference to `boost::thread_resource_error::thread_resource_error()'
collect2: ld returned 1 exit status

在1.40.0下是没有错误的,有人知道吗?

论坛徽章:
0
2 [报告]
发表于 2009-11-22 19:32 |只看该作者
难道没人用吗?

论坛徽章:
0
3 [报告]
发表于 2009-11-22 19:43 |只看该作者
没玩过,看了下源代码,你把asio的库加上试试吧

论坛徽章:
0
4 [报告]
发表于 2009-11-23 10:33 |只看该作者
我当时用的连接库是-lboost_thread-gcc41-mt , -lboost_filesystem-gcc41-mt类似.

论坛徽章:
0
5 [报告]
发表于 2009-11-23 12:18 |只看该作者

回复 #4 bill2012 的帖子

我编译的库中没有lboost_thread-gcc41-mt 这样的库啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP