Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何检查boost的版本?_Boost - Fatal编程技术网

如何检查boost的版本?

如何检查boost的版本?,boost,Boost,我需要1.40版本的boost库。如何检查boost库的版本 我正在尝试编译PCL库,如中所述。好吧,看看您的。有BOOST\u版本宏用于: // 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 / 10000

我需要1.40版本的boost库。如何检查boost库的版本

我正在尝试编译PCL库,如中所述。

好吧,看看您的。有
BOOST\u版本
宏用于:

// 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
然后,您将在终端上显示boost库版本。示例输出是针对Boost 1.55.0打印的


卡尔·冯·摩尔所说的也是正确的。看看这个就知道了

1.4是Boost的一个非常旧的版本。你是说1.40,这是一个非常不同的东西吗?正如@Nicol所指出的–你可能是指1.40,这是PCL库所需要的。我将问题改为1.40,而不是1.4。谢谢大家的回答。我是一个C++新手,这就是为什么需要你的帮助。
#include <boost/version.hpp>
#include <iostream>

using namespace std;

int main()
{
    cout << "Boost version: " << BOOST_LIB_VERSION << endl;
    return 0;
}
   $ g++ boost.cpp
   $ ./a.out
   Boost version: 1_55