Ubuntu14.04下安装 boost (boost_1.54 最简单的方法)


直接执行命令:

 sudo apt-get  install libboost-dev

测试:

创建一个 boost_test.cpp 文件,写入

#include<iostream>
#include<boost/lexical_cast.hpp>
int main()
{
   int a = boost::lexical_cast<int>("36");
   std::cout << a <<std::endl;
   return 0;
} 

 

执行命令:

g++ boost_test.cpp -o boost_test

./boost_test

最终结果为:

参考教程:

http://blog.chinaunix.net/uid-12226757-id-3427282.html

 

 

------------------------------------------------------------------------------------------------------------


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM