Linux(ubuntu) 下安装Boost 库

来源:互联网 发布:http传输数据大小 编辑:程序博客网 时间:2024/06/13 02:27
随便在哪个文件夹。
首先确保安装的依赖关系解决库
#sudo apt-get install build-essential

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

最后执行安装
#sudo apt-get installlibboost1.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

0 0
原创粉丝点击