1

Hello C++ and/or ROS Experts

I just made a fresh install of Ubuntu 12.04 and ROS.

My old installations was also on ubunru 12.04, and it worked great.

But now when i try to make or rosmake on of my project, i get the follwing error:

  Linking CXX executable ../bin/robot_task_execution
  /usr/bin/ld: cannot find -lrw_sandbox
  /usr/bin/ld: cannot find -lrw_control
  /usr/bin/ld: cannot find -lrw_algorithms
  /usr/bin/ld: cannot find -lrw_pathplanners
  /usr/bin/ld: cannot find -lrw_pathoptimization
  /usr/bin/ld: cannot find -lrw_task
  /usr/bin/ld: cannot find -lrw_simulation
  /usr/bin/ld: cannot find -lrw_opengl
  /usr/bin/ld: cannot find -lrw_lua
  /usr/bin/ld: cannot find -llua51
  /usr/bin/ld: cannot find -lrw_proximitystrategies
  /usr/bin/ld: cannot find -lyaobi
  /usr/bin/ld: cannot find -lpqp
  /usr/bin/ld: cannot find -lrw
  /usr/bin/ld: cannot find -lrw_qhull
  collect2: ld returned 1 exit status

Do you have any idear what this mean, or how to fix this?

I installed ROS like this, maybe i need something else?:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-fuerte-desktop-full
echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
. ~/.bashrc
sudo apt-get install python-rosinstall python-rosdep

Best regards Bjarke

Bjarkes
  • 99
  • 1
  • 2
  • 8
  • For future questions, answers.ros.org is the official support forum and may help you get answers to ROS-specific questions sooner. – Eric Perko Oct 12 '12 at 15:55

3 Answers3

2

The message says it does not find the libraries required to link your program. Quick look at installation guide says:

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
. ~/.bashrc

So I guess you should launch that setup.bash so that it updates the linker variables (typically LD_LIBRARY_PATH) to add the location of the missing libraries

remi
  • 3,914
  • 1
  • 19
  • 37
2

The error indicates that the linker is unable to find the libraries rw_sandbox, rw_sandbox etc. Make sure that you have the paths to the libraries' location specified in your makefile.

bobestm
  • 1,334
  • 1
  • 9
  • 8
0

You can link the libraries directly by adding the -llibs to the g++ command line.

Please check this answer: Compile roscpp without ros (using g++)

There the linking is done by adding the individual libraries on the command line.

Derzu
  • 7,011
  • 3
  • 57
  • 60