Installing boost at macOS

Installation of Boost at macOS is quite simple.

# get the sources

> mkdir $HOME/opt/src
> cd $HOME/opt/src
> curl -o https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
> tar zxf boost_1_72_0.tar.gz
> cd boost_1_72_0

# configure boost

> ./bootstrap.sh --prefix=$HOME/opt/usr/local/boost
> ./b2
> ./b2 install

# make sure to point to this location while compiling your code

> export BOOST_LIB=$HOME/opt/usr/local/boost/lib
> export BOOST_INC=$HOME/opt/usr/local/boost/include

> g++ -o some_code some_code.cc -L${BOOST_LIB} -lboost_system -I${BOOST_INC}