1. export -p 列出所有环境变量,查看boost库的环境变量$BOOST_ROOT是否为空。
如果为空,设置该变量。
export BOOST_ROOT=$BOOST_ROOT:/usr/include/boost
2.编写测试程序 例如boost-test.cpp
3.编译测试程序
g++ -I $BOOST_ROOT boost-test.cpp -o boost-test
4.运行程序
./boost-test