你怎么检查你的助推版本?

lak*_*ksh 12 boost

我需要在1.40版本中使用我的boost库.如何查看我的升级库版本?

我正在尝试编译PCL库,如http://pointclouds.org/downloads/source.html中所述.

Kar*_*oor 21

好吧,看看你的boost/version.hpp.有BOOST_VERSION宏观:

// 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
Run Code Online (Sandbox Code Playgroud)


MWH*_*MWH 8

#include <boost/version.hpp>
#include <iostream>

using namespace std;

int main()
{
    cout << "Boost version: " << BOOST_LIB_VERSION << endl;
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

将上述代码保存为cpp文件.示例boost.cpp.然后编译它.

   $ g++ boost.cpp
   $ ./a.out
   Boost version: 1_55
Run Code Online (Sandbox Code Playgroud)

然后,您将在终端上显示您的升级库版本.为Boost 1.55.0打印示例输出.

Karl von Moor所说的也是正确的.检查此链接以弄清楚.