ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

CMake compiles executable before generating message libraries

asked 2015-09-16 12:26:15 -0600

chrisb gravatar image


I face the problem that I get an compiling error while compiling something that is for example using a custom service. The error is that it can't find the headerfile or library that should be generated during catkin_make. If I compile it with one core (catkin_make -j1) it works fine. If it is compiled once the error does not occur again cause the library exists - till the next clean

I guess I defined something wrong in the CMakeList or is it a general problem?

Thanks in advance


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-16 12:54:01 -0600

Dirk Thomas gravatar image

Please see the catkin documentation for instructions:

You are missing a dependency between your executable target and the message generation step.

edit flag offensive delete link more


Thank you, I haven't had the dependency in one of my libraries, this line solved my problem:

add_dependencies(your_library ${catkin_EXPORTED_TARGETS})

chrisb gravatar image chrisb  ( 2015-09-16 13:18:00 -0600 )edit

Question Tools

1 follower


Asked: 2015-09-16 12:26:15 -0600

Seen: 146 times

Last updated: Sep 16 '15