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

Not sure if this will help anyone in particular but I've been trying to fix these link errors off and on for about a week now so I thought I'd share what I've found.

Ubuntu 12.04, ROS Hydro, Catkin, and Eclipse Indigo 3.7.2

So I've been trying to get my code into my Eclipse IDE. I ran the set up described in the IDE tutorial here, http://wiki.ros.org/IDEs

I then imported as the tutorial asked but got all sorts of link error issues... kept deleting the project and retrying the steps and checking to make sure that all components of C++ were installed for eclipse indigo. Tried manually adding libraries, but I was getting simple link errors like std::string.

Nothing in here really seemed to help with link errors. Until I noticed fivef and Quizzarex's answers here. I then went to workspace/src folder and ran the following,

cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j8

Then in eclipse I imported the existing project from the workspace/src folder.

This worked much nicer as far as removing unnecessary clutter from your Project Explorer in Eclipse since it added only my catkin projects as they are and not my all my project build folders along with a separate linked [Source directories] directory. Although there probably is a solution to that using the prior method from the build folder.

To my surprise this method also removed my linking errors.


If your still having errors you may want to try using Eclipse Kepler.

I started using and noticed a new feature called "Re-resolve Unresolved Includes". This is actually when I noticed that my Workspace/src folder worked after running "Re-resolve Unresolved Includes" in Kepler... but I've since tried remaking the Eclipse Project and importing, as I mentioned above from the workspace/src directory, and haven't been able to reproduce the unresolved link errors.

Hope this helps, I guess its kind of a redundant post to fivef's and Quizzarex's answers but I was finally happy to see no link errors and thought I'd mention my solution.