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

libboost error during linking

asked 2013-01-17 08:08:52 -0600

101010 gravatar image

updated 2016-04-20 17:08:41 -0600

130s gravatar image
Linking CXX executable ../bin/msg_synch
/usr/bin/ld: CMakeFiles/msg_synch.dir/src/msg_synch.o: undefined reference to symbol 'boost::signals::connection::~connection()'
/usr/bin/ld: note: 'boost::signals::connection::~connection()' is defined in DSO /usr/lib/libboost_signals.so.1.46.1 so try adding it to the linker command line
/usr/lib/libboost_signals.so.1.46.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

The above error occurs when I try to compile test code for approximate time synchronization. The boost library exists and is found, however, I can not interpret the error...other than the obvious, which does not work, adding the lib to the linker. Any suggestions?

As in a previous question, I am synching 3 separate messages with time stamped headers. link text

edit retag flag offensive close merge delete

Comments

How are you linking your executable?

tfoote gravatar image tfoote  ( 2013-02-04 17:22:24 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-12-13 00:46:37 -0600

sai gravatar image
# Put this line before the executable or library in your CMakeLists.txt
   rosbuild_add_boost_directories()
   # assuming that my_target is your executable
   rosbuild_add_executable(my_target my_srcs/my_target.cpp)
   # Put this line after the executable or library:
   rosbuild_link_boost(my_target signals)

source : http://wiki.ros.org/fuerte/Migration

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-17 08:08:52 -0600

Seen: 784 times

Last updated: Apr 20 '16