how do you check your version of boost? [duplicate]
I need to have my boost library in a version of 1.40. How do I check my version of the boost library?
I am trying to compile the PCL library, like described in http://pointclouds.org/downloads/source.html.
Well, take a look at your boost/version.hpp
. There is BOOST_VERSION
macro for that:
// Example: for boost 1.55.0, taken from boost/version.hpp
// BOOST_VERSION % 100 is the patch level
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 105500
#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.
精彩评论