Ask Your Question
1

‘make_shared’ is not a member of ‘boost’

asked 2011-09-21 08:43:03 -0500

prp gravatar image

Hi All,

Having a problem with upgrading to Electric. Getting a compile error on code that was fine under Diamondback: " 'make_shared' is not a member of 'boost' "

  /home/prp/ros/whatever/src/pointCloudUtils.cpp:118: error: ‘make_shared’ is not a member of ‘boost’
  /home/prp/ros/whatever/src/pointCloudUtils.cpp:118: error: expected primary-expression before ‘>’ token

The code is as follows:

unsigned int minZPt_faster(const pcl::PointCloud<pcl::PointXYZ> &cloud, const unsigned int kernelSize)
{
  KdTreeFLANN<PointXYZ>nN;

  nN.setEpsilon(.010);
  DefaultPointRepresentation<PointXYZ> pr;
  nN.setPointRepresentation(boost::make_shared<DefaultPointRepresentation<PointXYZ> > (pr));
  nN.setInputCloud(cloud.makeShared());
  nN.setMinPts(3);
  ...
}

The version of boost I have is 1.40. Unfortunately, as I didn't write this particular piece of code, I'm not clear on what the problem here is, and would appreciate any help! Thanks in advance...

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
8

answered 2011-09-21 08:54:33 -0500

Patrick Mihelich gravatar image
#include <boost/make_shared.hpp>
edit flag offensive delete link more

Comments

That did the trick - thanks!
prp gravatar image prp  ( 2011-09-21 09:10:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-09-21 08:43:03 -0500

Seen: 10,337 times

Last updated: Sep 21 '11