undefined reference to symbol '_ZN3ros10NodeHandle9subscribeERNS_16SubscribeOptionsE'
I am simply trying to compile a program in ROS. I already linked all the necessary libraries but this one I can't find. All I am getting is the following error in code blocks (also in eclipse).
Anybody know how to get rid of this error? Or even which library it require?
/usr/bin/ld:CMakeFiles/DistanceKinectDemo.dir/src/DistanceKinectDemo.cpp.o: undefined reference to symbol
'_ZN3ros10NodeHandle9subscribeERNS_16SubscribeOptionsE'
/opt/ros/kinetic/lib/libroscpp.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gpuvoxelgetpointcloud/CMakeFiles/DistanceKinectDemo.dir/build.make:370: recipe for target
'/home/pcl_gpu/devel/lib/gpuvoxelgetpointcloud/DistanceKinectDemo' failed
make[2]: *** [/home/shupeng/pcl_gpu/devel/lib/gpuvoxelgetpointcloud/DistanceKinectDemo] Error 1
CMakeFiles/Makefile2:1130: recipe for target 'gpuvoxelgetpointcloud/CMakeFiles/DistanceKinectDemo.dir/all' failed