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

Linking CXX shared library

asked 2011-12-03 10:48:18 -0500

Maneesh gravatar image

Hi, i have installed few packages and trying to build them using the "make" command and i am getting a linking error.... the code:

"Linking CXX shared library ../lib/ /usr/bin/ld: cannot find -lros collect2: ld returned 1 exit status make[3]: * [../lib/] Error 1 make[3]: Leaving directory /home/maneesh/ros_stacks/common/actionlib/build' make[2]: *** [CMakeFiles/actionlib.dir/all] Error 2 make[2]: Leaving directory/home/maneesh/ros_stacks/common/actionlib/build' make[1]: [all] Error 2 make[1]: Leaving directory `/home/maneesh/ros_stacks/common/actionlib/build' make: ** [all] Error 2"

how do i go about and eliminate the error?



edit retag flag offensive close merge delete


Can you tell us what, exactly, you did to cause this error? Which package are you building? Also, try using 'rosmake'.
Mac gravatar image Mac  ( 2011-12-03 11:35:44 -0500 )edit
well, i am installing a package called "common" from the for my project related to gazebo simulator. There is this sub folder called actionlib inside the main package. I tried to run the make command in "/home/maneesh/ros_stacks/common/actionlib/" directory and the above error showed up....
Maneesh gravatar image Maneesh  ( 2011-12-03 11:46:08 -0500 )edit
I also run the rosmake command, and i see no failures in that list....
Maneesh gravatar image Maneesh  ( 2011-12-03 11:46:55 -0500 )edit
If you want to use actionlib in your project, the correct thing to do is add a dependency to your own package's manifest.xml; then linking and everything else will work.
Mac gravatar image Mac  ( 2011-12-04 03:33:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-12-03 21:18:19 -0500

tfoote gravatar image

If rosmake passes with no errors, then if you rerun make in the package it should be working now, since rosmake calls make in that package and all dependents in the right order.

edit flag offensive delete link more


When i ran the rosmake command, i get : [rosmake ] Results: [ rosmake ] Built 23 packages with 0 failures. but right after that if i run the make command, i get the same error as i mentioned above....
Maneesh gravatar image Maneesh  ( 2011-12-03 23:38:11 -0500 )edit

@Maneesh please provide more details how to reproduce the error. Your ROS_PACKAGE_PATH and where you have installed everything would be helpful. Please edit your question to include these at the bottom.

tfoote gravatar image tfoote  ( 2012-03-29 21:12:11 -0500 )edit

Question Tools


Asked: 2011-12-03 10:48:18 -0500

Seen: 2,795 times

Last updated: Dec 03 '11