ubuntu下boost库编译问题

canglanqu 2015-07-18 01:58:00
问题说明:
最近在学习boost库,遇到了问题,#include <boost/asio.hpp>时候报错,
查了一些资料,可能是system库没有编译引起的,可是在网上找了一些编译方法,都没有通过

我是在ubuntu下安装了boost,安装方法采用如下方式:
# apt-cache search boost
找到 libboost-dev, 直接安装:
# apt-get install libboost-dev
一般的库都能用,比如智能指针、bing等


我现在应该怎么编译,可以使用asio,或者说使用system
...全文
324 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
飞翔的薄荷 2015-07-21
  • 打赏
  • 举报
回复
去官方下载boost_1_58_0.tar.gz,解压后先cd到boost_1_58_0文件夹。 (1)./bootstrap.sh (2) ./b2 install 测试使用asio没有问题。
canglanqu 2015-07-21
  • 打赏
  • 举报
回复
引用 1 楼 iyomumx 的回复:
会装libboost,不会装其它库?
引用
apt-cache search libboost | grep system libboost-filesystem-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ (default version) libboost-filesystem1.54-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-filesystem1.54.0 - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-system-dev - Operating system (e.g. diagnostics support) library (default version) libboost-system1.54-dev - Operating system (e.g. diagnostics support) library libboost-system1.54.0 - Operating system (e.g. diagnostics support) library libboost-filesystem1.55-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-filesystem1.55.0 - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-system1.55-dev - Operating system (e.g. diagnostics support) library libboost-system1.55.0 - Operating system (e.g. diagnostics support) library
。。。灯下黑了,没想到。。。
ztenv 版主 2015-07-18
  • 打赏
  • 举报
回复
下载源码,b2 --build-type=complete
cobra_chen 2015-07-18
  • 打赏
  • 举报
回复
不能用给有什么错误提示啊。
iyomumx 2015-07-18
  • 打赏
  • 举报
回复
会装libboost,不会装其它库?
引用
apt-cache search libboost | grep system libboost-filesystem-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ (default version) libboost-filesystem1.54-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-filesystem1.54.0 - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-system-dev - Operating system (e.g. diagnostics support) library (default version) libboost-system1.54-dev - Operating system (e.g. diagnostics support) library libboost-system1.54.0 - Operating system (e.g. diagnostics support) library libboost-filesystem1.55-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-filesystem1.55.0 - filesystem operations (portable paths, iteration over directories, etc) in C++ libboost-system1.55-dev - Operating system (e.g. diagnostics support) library libboost-system1.55.0 - Operating system (e.g. diagnostics support) library

64,282

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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