Hello. I have a problem with using the PCL library in MFC environment.
This post has NOT been accepted by the mailing list yet.
Hi. I have downloaded "PCL 1.6.0 All-In-One Installer" for Windows VS2010(x64) and installed successfully. Also, I have compiled the sample code successfully in Win32 console application(C/C++) environment. The code is located below.
However, the errors occurred when I compile in dialog-based MFC environment with the same code. The representative errors were
pcl/io/pcd_io.h(328): error C2589: '(' : illegal token on right side of '::'
pcl/io/pcd_io.h(341): error C2589: '(' : illegal token on right side of '::'
pcl/correspondence.h(70): error C2589: '(' : illegal token on right side of '::'
pcl/correspondence.h(94): error C2065: 'Correspondences' : undeclared identifier
pcl/correspondence.h(120): fatal error C1903: unable to recover from previous error(s); stopping compilation.
These errors did not show up when I compile the code in Win32 console environment. Therefore, I added "#undef min, #undef max" before the header(pcl/io/pcd_io.h), then the errors disappeared even there are a lot of warnings.
Nonetheless, another errors occurred. The location of the errors is the part of loading PCD file.
1.Location of error: "pcl::PointCloud<pcl::PointXYZ>::Ptr pcloud (new pcl::PointCloud<pcl::PointXYZ>);"
Error message: "Error: no instance of overloaded "pcl::PointCloud<PointT>::operator new [with PointT=pcl::PointXYZ]" matches the argument list"
2.Location of error: "return(-1);"
Error message: "Error: return value type does not match the function type"