Ask Your Question

Do not understand reason for compile error

asked 2014-02-28 13:47:55 -0500

flb gravatar image

Consider the following partial application in my new Hydro installation

#include <ros/ros.h>
int main(int argc, char** argv) {

when compiled with

g++  -I/opt/ros/hydro/include

I get the error: "undefined reference to 'ros::start()'"

There is no error about a missing include and I even included <ros init.h=""> and got the same error. I can see ROSCPP_DECL void start();

Does anybody know why I get this compile error?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-28 15:08:32 -0500

demmeln gravatar image

updated 2014-03-01 05:09:02 -0500

It is a linker error. You will have to link against libroscpp.


You might find these excellent tutorials by Jonathan Bohren useful. They explain step by step and bottom up how programs using ROS are built and how this is aided by catkin.

edit flag offensive delete link more


That was it, thanks.

flb gravatar image flb  ( 2014-03-01 02:48:55 -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

1 follower


Asked: 2014-02-28 13:47:55 -0500

Seen: 137 times

Last updated: Mar 01 '14