Thanks!
The problem is that I only declare a new icp object like
pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp;

As soon as you uncomment this one, the segfault happen. I’m not starting to input any point cloud to it.
In the pure cpp example 11, everything is fine.