At first I tried to build
libpcl by using the macports.
After installing the libraries on which libpcl depends, I failed to build it.
It seems difficult for me to install libpcl through the macports. So I decided to build it from the source code.After downloading the source code from here, I decompressed it. The dependent libraries are already installed by the macports. Unfortunately an error caused the building to stop. The error is due to the definitions of the non-member template functions described in
pcl-pcl-1.7.1/io/include/pcl/io/ply/ply_parser.h. It may be clang's bug.
I fixed it in accordance with
this site.
The fixed code is as follows:
1. delete definitions of two functions named
at:
2. delete definitions of funcions named at once more:
3. move the deleted four definitions to a different area as:
Again make.
I got an error as:
Seeing this site, I fixed it as
Again make.
I had a different error:
I gave up the compilation of all modules libpcl has.
Since the modules that I am unable to compile are just ones relate to linemode,
I excluded them from the building targets. To this aim, I commented out lines from 114 to 121 in pcl-pcl-1.7.1/tools/CMakeLists.txt.
Again, make.
Mission accomplished!
The sample code worked well.









