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

Trouble using default Boost libraries.

asked 2015-05-20 14:08:27 -0600

daniel_dsouza gravatar image

updated 2015-05-21 16:34:55 -0600

Hello,

I am having trouble using the priority queue from the default Boost installation with my ros node. Some libraries can be found, and some cannot. I can find the basics like system, thread, and signals, but I cannot find lambda or priority_queue.

Error Message:

CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
 Unable to find the requested Boost libraries.

 Boost version: 1.54.0

 Boost include path: /usr/include

 Could not find the following Boost libraries:

    boost_lambda  
    boost_heap

 Some (but not all) of the required Boost libraries were found.  You may
 need to install these additional Boost libraries.  Alternatively, set
 BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
 to the location of Boost.
Call Stack (most recent call first):
 CMakeLists.txt:16 (find_package)

My CMakesList.txt. The comments are things that did not work.

#SET (Boost_LIB_PREFIX "")
#SET(BOOST_LIBRARYDIR "/usr/lib/x86_64-linux-gnu")
find_package(Boost REQUIRED COMPONENTS
   system 
   thread
   signals
   lambda
   priority_queue
)

EDIT: I'm using Ubuntu 14.04.2 LTS and ROS Hydro compiled from source

edit retag flag offensive close merge delete

Comments

Please update your question with information on your OS and which version of ROS you are working with.

gvdhoorn gravatar image gvdhoorn  ( 2015-05-20 14:46:08 -0600 )edit

edits added

daniel_dsouza gravatar image daniel_dsouza  ( 2015-05-21 11:17:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-21 11:40:46 -0600

gvdhoorn gravatar image

updated 2015-05-22 02:10:58 -0600

According to boost.org/doc/libs/1_54_0, priority_queue is not a boost lib. Are you sure that is the name of the library/component?

That same page states that priority queues are part of the Heap library.


Edit:

I tried heap and Heap, but that did not work either. I'm thinking the problem would be similar for the lambda library. Is there a way I can list all the libraries that are available?

Heap and Lambda are header only libraries, they don't have anything to link against. This may be a bit confusing, but you only add 'libraries' of Boost to your find_package(Boost COMPONENTS ..) call if those libraries are not header-only.

See also Boost - Getting Started on Unix Variants - Header-Only Libraries

edit flag offensive delete link more

Comments

I tried heap and Heap, but that did not work either. I'm thinking the problem would be similar for the lambda library. Is there a way I can list all the libraries that are available?

daniel_dsouza gravatar image daniel_dsouza  ( 2015-05-21 16:21:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-20 14:08:00 -0600

Seen: 1,557 times

Last updated: May 22 '15