Ask Your Question
0

Boost Library Link Failure

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

101010 gravatar image

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

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/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

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

Comments

Which boost directories did you add using rosbuild_add_boost_directories()?

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

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Stats

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

Seen: 267 times

Last updated: Jan 19 '13