How to compile the listener.cpp and talker.cpp without cmake
Upon reading the following tutorial Simplest ROS tutorial, I wanted to compile the listener.cpp and talker.cpp given here.
I am using the following command, as directed by the tutorial:
g++ listener.cpp -o listener_node -I/opt/ros/indigo/include -L/opt/ros/indigo/lib -Wl,-rpath,/opt/ros/indigo/lib -lroscpp -lrosconsole -lrostime
I get the following error:
/usr/bin/ld: /tmp/ccbskyfi.o: undefined reference to symbol '_ZN3ros13serialization18throwStreamOverrunEv'
/opt/ros/indigo/lib/libroscpp_serialization.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
How can I resolve the issue and run the code?
** I did not include the message header files since they should already be included by:
-I/opt/ros/indigo/include -L/opt/ros/indigo/lib