鉴于代码. . .
#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命令.