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

Revision history [back]

click to hide/show revision 1
initial version

The text in your title catkin_make recipe for target ' ' failed means the build failed. Look a few lines higher to see why.

[ 83%] Linking CXX executable /home/student/slamdog/catkin_ws/devel/lib/slamdog_core/slamdog_core
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
slamdog_core/CMakeFiles/slamdog_core.dir/build.make:141: recipe for target '/home/student/slamdog/catkin_ws/devel/lib/slamdog_core/slamdog_core' failed

Neither of the files SensorPublisher.cpp or OdomPublisher.cpp contain an int main() {...} function. Is there another source file containing main()? If there is no main() because the goal is to create a library then use add_library() instead of add_executable().