Ask Your Question

libboost error during linking

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

101010 gravatar image

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

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/ so try adding it to the linker command line /usr/lib/ 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


How are you linking your executable?

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

1 answer

Sort by ยป oldest newest most voted

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

sai gravatar image
# Put this line before the executable or library in your CMakeLists.txt
   # 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 :

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]

Question Tools


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

Seen: 424 times

Last updated: Dec 13 '13