【问题标题】:Building PCL: pcl_kdtree 'left of .serialize must have class/struct/union'构建 PCL:pcl_kdtree '.serialize 左侧必须有类/结构/联合'
【发布时间】:2014-12-11 13:45:27
【问题描述】:

我正在使用 VisualStudio 2013 为 windows 7 编译 PCL,我在 include/flann/util/serialization.h 中遇到错误:

error C2228: left of '.serialize' must have class/struct/union  D:\Libs\PCL\flann\include\flann\util\serialization.h    18  1   pcl_kdtree

有一个类似的错误 Serializing struct containing char* 关于 FLANN 库。

我正在使用来自 PCL 的 git、Boost 1.57、flann 1.8.1、Visual Studio 2013 x64 的头部版本。

这有什么问题?

【问题讨论】:

    标签: c++ boost point-cloud-library


    【解决方案1】:

    解决方案与 FLANN 本身有关,

    https://github.com/chambbj/osgeo-superbuild/issues/3

    需要编辑include/flann/util/serialization.h中的serialize.h文件,在第92行(如果不是92,它在其他BASIC_TYPE_SERIALIZER()declarations周围,并添加

    #ifdef _MSC_VER
    BASIC_TYPE_SERIALIZER(unsigned __int64);
    #endif
    

    导致

    // declare serializers for simple types
    BASIC_TYPE_SERIALIZER(char);
    BASIC_TYPE_SERIALIZER(unsigned char);
    BASIC_TYPE_SERIALIZER(short);
    BASIC_TYPE_SERIALIZER(unsigned short);
    BASIC_TYPE_SERIALIZER(int);
    BASIC_TYPE_SERIALIZER(unsigned int);
    BASIC_TYPE_SERIALIZER(long);
    BASIC_TYPE_SERIALIZER(unsigned long);
    BASIC_TYPE_SERIALIZER(float);
    BASIC_TYPE_SERIALIZER(double);
    BASIC_TYPE_SERIALIZER(bool);
    #ifdef _MSC_VER
    BASIC_TYPE_SERIALIZER(unsigned __int64);
    #endif
    

    【讨论】:

      猜你喜欢
      • 2016-10-21
      • 2014-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多