I wont be able to create reference to Bag class: undefined reference to `rosbag::Bag::Bag()
I am using this tutorial. I just want to read the Bag file, but there is linker error: undefined reference to `rosbag::Bag::Bag()'
as per tutorial I added all header files (and those all are present in the place where they are supposed to.) The header files are included successfully. I checked it by :
cout<< rosbag::rosmode::Read<< endl;
which produce the output :
2
Now if I add the following line to source code
rosbag::Bag bag;
it raising an error:
undefined reference to `rosbag::Bag::Bag()'
I have one doubt: Is rosbag/bag.h is responsible to create reference of rosbag::Bag ??
Further I have seen ros.cpp here But this bag.cpp is not there in my system. (I tried to find it with command - locate bag.cpp)
Also I don't want to use any node, launch, workspace or package of ros to do so, As I want to run this in isolation. (I am not a very good c++ programmer, forgive me if I am doing any silly mistake. :) )
Any help would be appreciated. Thank you.