这里我用的是boost_1_61_0,可以在sourceforge上面下载。
进入文件夹后,首先编译b2,赋予sh文件可执行的权限:
chmod +x bootstrap.sh
chmod +x ./tools/build/src/engine/build.sh
执行bootstrap.sh生成b2:
./bootstrap.sh
输入命令:
./b2 stage --toolset=clang --with-date_time --with-thread --stagedir=/Users/lml/Documents/depends/boost_1_61_0/mylibs/clang link=static runtime-link=static threading=multi address-model=64 architecture=x86
各项命令含义以及Windows/Linux下安装的方法参考这篇博客。