Ask Your Question
0

[Solved]catkin_make error: c++: error: $(catkin_LIBRARIES) no such file or directory

asked 2014-03-27 03:22:03 -0500

4LV4R0 gravatar image

updated 2016-10-24 08:36:37 -0500

ngrennan gravatar image

Good afternoon partners

I´m running ROS Groovy on Raspbian .

I wrote a publisher in C++ "robot1.cpp" .

After that and following the instructions from:

http://wiki.ros.org/ROS/Tutorials/Wri...

I added these lines at bottom of my CMakeLists.txt:

include_directories(include ${catkin_INCLUDE_DIRS})

add_executable(robot1 src/robot1.cpp)

target_link_libraries(robot1 ${catkin_LIBRARIES})

add_dependencies(robot1 alvaro_generate_messages_cpp)

When I do "catkin_make" I get the next :

[ 21%] Building CXX object alvaro/CMakeFiles/robot1.dir/src/robot1.cpp.o

/tmp/ccREQxsT.s: Assembler messages:

/tmp/ccREQxsT.s:505: Warning: swp{b} use is deprecated for this architecture

Linking CXX executable /home/pi/catkin_ws/devel/lib/alvaro/robot1

c++: error: $(catkin_LIBRARIES):There is no such file or directory

make[2]: * [/home/pi/catkin_ws/devel/lib/alvaro/robot1] Error 1

make[1]: * [alvaro/CMakeFiles/robot1.dir/all] Error 2

make: * [all] Error 2

Invoking "make" failed

I´ve just followed the tutorial steps so that I don´t know what´s happening.

Can you help me please?

edit retag flag offensive close merge delete

Comments

Oh my God! I´m quite blind .... apologies for any inconvenience. I need my glasses to see ... I´m absolutely a disaster. It was exactly what you said to me. I didn´t realice it. ${catkin_LIBRARIES} rather than $(catkin_LIBRARIES). Thanks a lot!

4LV4R0 gravatar image4LV4R0 ( 2014-03-27 05:39:35 -0500 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2014-03-27 05:17:05 -0500

Wolf gravatar image

Do you have find_package(catkin REQUIRED COMPONENTS roscpp ... in your CMakeLists.txt? Are your sure your CMakeLists.txt contains ${catkin_LIBRARIES} rather than $(catkin_LIBRARIES) (suggested by your error) ?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-03-27 03:22:03 -0500

Seen: 1,632 times

Last updated: Mar 27 '14