When doing Gaussian filtering/convolution filtering of pcl, there is a problem with referencing convolution_3d.hpp, and the following error is reported
The current pcl version number is pcl1.12.1
wrong content
severity |
the code |
illustrate |
document |
OK |
mistake |
C2143 |
Syntax error: missing ';' (before '<') |
C:\pcl12\PCL 1.12.1\include\pcl-1.12\pcl\filters\convolution_3d.h |
159 |
mistake |
C4430 |
Missing type specifier - int assumed. Note: C++ does not support default int |
C:\pcl12\PCL 1.12.1\include\pcl-1.12\pcl\filters\convolution_3d.h |
159 |
mistake |
C2238 |
Unexpected token before ';' |
C:\pcl12\PCL 1.12.1\include\pcl-1.12\pcl\filters\convolution_3d.h |
159 |
Solution
method one:
Open the file convolution_3d.hpp and add code
#include <boost/optional.hpp>
Method Two:
Replace the pcl1.12.1 library with pcl1.13.1, because pcl1.13.1 has perfected this bug
See the source link for details:
Point Cloud Library (PCL): pcl/filters/convolution_3d.h Source File
Or directly copy and paste all the codes in this page into the current error file.