加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 包含boost :: asio头时抛出运行时异常

发布时间:2020-12-16 07:01:13 所属栏目:百科 来源:网络整理
导读:鉴于代码. . . #include boost/asio.hpp int main(){ return 0;} 我编译它并链接boost_system-mt,然后运行它并从控制台获得以下输出. $./clientapp terminate called after throwing an instance of ‘boost::exception_detail::clone_impl ‘ what(): No su
鉴于代码. . .

#include <boost/asio.hpp> 

int main()
{
    return 0;
}

我编译它并链接boost_system-mt,然后运行它并从控制台获得以下输出.

$./clientapp

terminate called after throwing an instance of
‘boost::exception_detail::clone_impl

‘ what(): No such file or directory Abort trap

这看起来不太好.这是怎么回事?

解决方法

Boost :: Asio也需要pthread.尝试编译添加-lpthread到gcc命令.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读