有没有办法在C++代码中检查PCL版本?
我需要在源代码级别上实现1.6和1.7之间的兼容性,也就是像这样:
#if PCL_VERSION >= 1.7
// some tasty functionality
#else
some old replacement
#endif
有没有办法在C++代码中检查PCL版本?
我需要在源代码级别上实现1.6和1.7之间的兼容性,也就是像这样:
#if PCL_VERSION >= 1.7
// some tasty functionality
#else
some old replacement
#endif
在 "pcl_config.h" 头文件中定义了 PCL 版本和其他一些有用的预处理器宏。例如,要有条件地编译低于 1.7.2 版本的一些回退代码,可以编写:
#include <pcl/pcl_config.h>
#if PCL_VERSION_COMPARE(<, 1, 7, 2)
... fallback code ...
#endif
#include <pcl/pcl_config.h>
std::cout << PCL_VERSION << std::endl;