首页 > 学院 > 开发设计 > 正文

VS2015 x64环境下编译flann源代码错误:serialize 左边必须有类/结构/联合 的解决方法

2019-11-08 02:17:15
字体:
来源:转载
供稿:网友

.serialize 左边必须有类/结构/联合 的解决方法。

具体原因,记得好像是serialize的定义和64位系统的定义有冲突,解决办法是:

在 serialzation.h头文件大概90-100行的时候,添加下面代码: 防止冲突。
#ifdef _MSC_VER  BASIC_TYPE_SERIALIZER(unsigned __int64);#endif 具体位置就是在这些类型声明后面加。

// declare serializers for simple typesBASIC_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);


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表