1. https://www.mrpt.org/Building_and_Installing_Instructions#1_Prerequisites
P1. error C2371: “int32_t”: 重定义;不同的基类型 或“int8_t”
解决办法:因为两个.h文件所定义的int32_t和int8_t的类型不同。错误会提示哪两个.h文件冲突,打开pstdint.h文件,找到对应的定义,并修改为另一个.h文件的定义类型。
P2. Miscellaneous.h文件 error C2719: “p1”: 具有 __declspec(align('16')) 的形参将不被对齐 ,这个问题是编译时候包含了对PCL的支持
//Miscellaneous.h 修改为 struct Segment { Segment(const PointT& p0, const PointT& p1) { P0 = p0; P1 = p1; }; PointT P0, P1; }; /*! Square of the distance between two segments */ float PBMAP_IMPEXP dist3D_Segment_to_Segment2(const Segment& S1, const Segment& S2); //对应的 Miscellaneous.cpp 修改为 float PBMAP_IMPEXP dist3D_Segment_to_Segment2(const Segment& S1, const Segment& S2) {} //同时注释掉 PbMapMaker.h typedef pcl::PointXYZRGBA PointT;