Ask Your Question
0

libboost error during linking

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

101010 gravatar image

updated 2014-01-28 17:14:53 -0500

ngrennan 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. http://answers.ros.org/question/52178/synchronizing-3-messages-build-errors/ (link text)

edit retag flag offensive close merge delete

Comments

How are you linking your executable?

tfoote ( 2013-02-04 17:22:24 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

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

Seen: 274 times

Last updated: Dec 13 '13