I just want to know how I can find the version of boost installed in my ubuntu 12.04? I am having trouble with the current precise and thinking of reverting back to 8.04. What is the boost version in 8.04?
Asked
Active
Viewed 1.6e+01k times
4 Answers
70
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'
Jorge Castro
- 73,717
26
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"
1
In the C++ source file!
#include <iostream>
#include <boost/version.hpp>
int main() {
std::cout << BOOST_LIB_VERSION << '\n';
}
Yas
- 119
0
To query the version available via apt without installing first
apt-cache policy libboost-dev
All of the other answers require boost to already be installed
user3728501
- 1,142