ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

‘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)

  DefaultPointRepresentation<PointXYZ> pr;
  nN.setPointRepresentation(boost::make_shared<DefaultPointRepresentation<PointXYZ> > (pr));

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

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

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


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


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

Seen: 11,500 times

Last updated: Sep 21 '11