#include <boost/version.hpp>
#include <iostream>
using namespace std;
int main()
{
cout << "Boost version: " << BOOST_LIB_VERSION << endl;
return 0;
}
Save the above code as a cpp file. example boost.cpp. Then compile it.
$ g++ boost.cpp
$ ./a.out
Boost version: 1_55
Then you will get your boost library version displayed on your terminal. The example output is printed for Boost 1.55.0.
What Karl von Moor had said is also correct. Check this link to figure it out.