我正在用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*中有一个关于FLANN库的简单错误。
我正在使用PCL的git,Boost 1.57,flann 1.8.1,Visual 2013 x64的头版本。
这是怎么回事?
发布于 2014-12-11 14:59:37
解决办法与弗兰本身有关,
https://github.com/chambbj/osgeo-superbuild/issues/3
需要编辑第92行中的serialize.h文件(如果不是第92行,则在其他BASIC_TYPE_SERIALIZER()声明周围),然后添加
#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);
#endifhttps://stackoverflow.com/questions/27424343
复制相似问题