Rosanswers logo

Hi all,

I would like to save some points cloud from my kinect using the rosbag, but when I'm just trying to do basic write and read rosbags (not even point cloud) like in this tutorial, I've got this error undefined reference to rosbag::Bag::Bag() and it's for the declaration of my rosbag rosbag::Bag bag.

Maybe it's the way I'm using it (in the main of my node), I really don't know. I did the include of rosbag/bag.h (and rosbag/view.h but not really useful yet) and I don't see what the problem, I'm pretty sure it's obvious so forgive me.

When I'm reading the CookBook or Code API I don't understand how I should use the rosbag in my code.

Thank you for your help,


Originally posted by Brioche on ROS Answers with karma: 115 on 2012-10-14

Post score: 0


1 Answer 1


Rosanswers logo

It seems like your linker flags do not include rosbag. Just add

<depend package="rosbag" />

in your manifest.xml file.

Originally posted by Lorenz with karma: 22731 on 2012-10-14

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Brioche on 2012-10-15:
Thanks a lot, this line was missing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.