0
$\begingroup$

Rosanswers logo

Hello,

I was having some problems before with linking TinyXML to my package, which I got to work now, but after that I received weird linking errors:

  Undefined symbols for architecture x86_64:
    "ros::init(int&, char**, std::string const&, unsigned int)", referenced from:
        _main in MotorController.cpp.o
    "ros::spin()", referenced from:
        _main in MotorController.cpp.o
  ld: symbol(s) not found for architecture x86_64

As if ROS was not compiled or not compiled properly. So I wanted to try and reinstall/recompile ROS so that I could be sure it was up to date. However compiling gives me a linking error now too :

==> make -j8 -l8 in '/Users/hansgaiser/ros_catkin_ws/build_isolated/class_loader'
Linking CXX shared library /Users/hansgaiser/ros_catkin_ws/devel_isolated/class_loader/lib/libclass_loader.dylib
ld: library not found for -lPocoFoundation

I have no idea what PocoFoundation and why it is no longer found. All my system dependencies are met, according to rosdep and I am trying to compile a fresh install of ROS.


Originally posted by Hansg91 on ROS Answers with karma: 1909 on 2013-02-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

PocoFoundation is part of poco, ensure that poco is installed from homebrew (or what ever package manager you are using).

The first error can occur when you use the ros headers (ros.h) but do not link against the ros library. It might be that your package does not find_package(...) and then target_link_libraries(...) roscpp.


Originally posted by WilliamWoodall with karma: 1626 on 2013-02-04

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Hansg91 on 2013-02-04:
You are probably correct about the first error, but according to homebrew poco was installed. I uninstalled and reinstalled it but this did not solve the error. I see the libs are located at /usr/local/lib and /usr/local/Cellar/poco/1.4.5/lib.

Comment by WilliamWoodall on 2013-02-04:
Do you have /usr/local/lib/libPocoFoundation.dylib?

Comment by Hansg91 on 2013-02-04:
Yes, /usr/local/lib/libPocoFoundation.15.dylib /usr/local/lib/libPocoFoundation.dylib /usr/local/lib/libPocoFoundationd.15.dylib /usr/local/lib/libPocoFoundationd.dylib Those are the files that I have there.

Comment by WilliamWoodall on 2013-02-05:
In that case, I can only guess that the state of your build is stale, please remove your build and devel folder and rebuild everything in a clean terminal environment.

Comment by Hansg91 on 2013-02-05:
I don't know what exactly caused it, but I removed everything I could and started over, it seems to be resolved now. I believe the first error is also resolved by depending on roscpp. Now I have a new boost linking error, but thats for a new question.

Comment by WilliamWoodall on 2013-02-06:
Most likely you built your workspace, then changed something in brew (uninstalled/updated poco) and then tried to build again with out of date information.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.