How can I find Boost version?

Solution 1:

The version of libboost on my 12.04 system is 1.48.0.2. Here's how you can find out:

dpkg -s libboost-dev | grep 'Version'
  • How can I find the version number of an installed package via dpkg?

Solution 2:

You can check version.hpp inside Boost include dir (normally /usr/include/boost, you can use locate /boost/version.hpp or similar to get that) for BOOST_VERSION or BOOST_LIB_VERSION.

$ cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"

//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
#define BOOST_LIB_VERSION "1_53"

SO: How to determine the Boost version on a system?