您的位置:首页 > 运维架构 > Linux

Linux(ubuntu) 下安装Boost 库

2016-08-29 12:50 507 查看
随便在哪个文件夹。
首先确保安装的依赖关系解决库
#sudo apt-get install build-essential

然后#
apt-cache search boost
可以看看跟boost有关的有哪些,一般现在都是libboost这样的。
#sudo apt-get
install libboost 按tab键,查看所有可用版本,我们这里选择1.54版本的 。

最后执行安装
#sudo apt-get install
libboost1.54-dev
#sudo apt-get install libboost1.54-all-dev

就可以了
然后

1.测试代码
http://www.open-abc.com/ccode-206.html
2.编译,运行

--g++ -o test test.cpp

#ls

test  test.cpp

# ./test 

123456

123.456
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: