ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Boost Library Link Failure

asked 2013-01-19 10:16:27 -0600

101010 gravatar image

updated 2013-01-19 13:54:35 -0600

joq gravatar image
Linking CXX executable ../bin/decision_ensemble
  /usr/bin/ld: CMakeFiles/decision_ensemble.dir/src/decision_ensemble.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

Anyone have this issue before?

My CMakeLists.txt has: rosbuild_add_boost_directories() added.

Call using boost bind:

sync.registerCallback(boost::bind(&DecisionEnsemble::ensembleCallback, &ensemble, _1, _2, _3));

I am trying to synch 3 messages containing a header with timestamp, a string and an int32.

Using the approximate example in the tutorials and various blogs out there have not helped.

Can anyone share there successful use of approximate time and CMakeLists.txt as an example to point me in the correct direction?

edit retag flag offensive close merge delete


Which boost directories did you add using rosbuild_add_boost_directories()?

joq gravatar image joq  ( 2013-01-19 13:56:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-19 20:40:36 -0600

Alireza gravatar image

Simply add:

rosbuild_link_boost(target lib1 lib2 lib3 ...)

to your CMakeList.txt, in your case:

rosbuild_link_boost( yourExecutableName signals )
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

Question Tools


Asked: 2013-01-19 10:16:27 -0600

Seen: 308 times

Last updated: Jan 19 '13