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

Catkin_make error

asked 2014-09-16 19:43:36 -0500

dshimano gravatar image

Hello, I'm having a problem with catkin_make. When I run run it i get

-- Using these message generators: gencpp;genlisp;genpy
-- tum_ardrone: 1 messages, 5 services
-- Configuring done
CMake Error at rosberry_pichopter/CMakeLists.txt:94 (add_library):
  Cannot find source file:

    src/rosberry_pichopter/joy/src/servo.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


-- Build files have been written to: /home/donni/catkin_ws/build
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

With a bunch of stuff before it. I don't know why I'm getting the error, becouse servo.cpp is in catkin_ws/src/rosberry_pichopter/joy/src/servo.cpp. I'm using hydro.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-17 01:40:15 -0500

Wolf gravatar image

updated 2014-09-17 01:43:19 -0500

The error:

CMake Error at rosberry_pichopter/CMakeLists.txt:94 (add_library):
  Cannot find source file:

Means that cmake is looking for the file and did not find it. It looks for the file relatively to the base directory of your package (not the base directory of your catkin workspace!!!!). I. e. the error message is fully consistent with what you mentioned:

Your source file is placed in

catkin_ws/src/rosberry_pichopter/joy/src/servo.cpp

CMake looks for the file in

catkin_ws/src/rosberry_pichopter/src/rosberry_pichopter/joy/src/servo.cpp

The reason, I guess, is that you a have an add_executable or add_library in your CMakeLists.txt which looks like:

add_executable( your_target src/rosberry_pichopter/joy/src/servo.cpp )

while it should rather look like:

add_executable( your_target joy/src/servo.cpp )
edit flag offensive delete link more
0

answered 2014-09-16 19:59:19 -0500

Thiagopj gravatar image

Probably your CMakeList is trying to find you 'servo.cpp' in 'rosberry_pichopter/src/servo.cpp'.

Look at add_executable and include_directories.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-16 19:43:36 -0500

Seen: 3,233 times

Last updated: Sep 17 '14