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

how to use Boost.Asio in cmakelist

asked 2016-09-25 08:13:42 -0500

lizhecome gravatar image

updated 2016-09-25 08:14:52 -0500

hello,

I want to use serial_port in ROS, and it belong to Boost.Asio. When I add asio in cmakelist like this

find_package(Boost REQUIRED system thread asio)

error happend like this

CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):


Unable to find the requested Boost libraries.



 Boost version: 1.58.0



Boost include path: /usr/include


Could not find the following Boost libraries:

      boost_asio



 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.

What should I write in cmakelist if I want to use asio?
Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-09-25 09:05:41 -0500

Thomas D gravatar image

Try removing asio from the list so that you end up with:

find_package(Boost REQUIRED COMPONENTS thread system)

That works for me in the os5000 package.

edit flag offensive delete link more

Comments

+1 and here's another example package: xv_11_laser_driver

spmaniato gravatar image spmaniato  ( 2016-09-25 10:28:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-25 08:13:42 -0500

Seen: 5,137 times

Last updated: Sep 25 '16