0x001 系统版本
系统版本:Ubuntu 16.04
boost 版本:1.58.0
0x002 实现代码
#include <iostream>
#include <boost/version.hpp>
#include <boost/config.hpp>
using namespace std;
int main(int argc, char* argv[])
{
cout << BOOST_VERSION << endl; //boost版本号
cout << BOOST_PLATFORM << endl; //所处的系统
return 0;
}
0x003 编译指令
reacher@ubuntu:g++ boostfunc.cpp -ofmain -lboost_system
输出结果: reacher@ubuntu:~/boost$ ./fmain
105800
linux