0
$\begingroup$

Rosanswers logo

Hi all,

My first try of ROS ends up with this error that I could not fix: I used catkin_create_pkg to create a ros_test package, and I also appropriately modified both CMakeLists.txt and package.xml according to a tutorial. When I did catkin_make, I got the confusing error since I already have boost on my machine and I think ROS also sees it. Can anyone give me some hints to fix this? Thanks!

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

Boost version: 1.60.0

Boost include path: /usr/local/boost_1_60_0

Could not find the following Boost libraries:

      boost_roscpp

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.

EDIT: Sorry for this silly question. I put find_package(Boost REQUIRED COMPONENTS roscpp) instead of find_package(catkin REQUIRED COMPONENTS roscpp) in my CMakeLists.txt. That's why it can't find boost_roscpp.


Originally posted by k on ROS Answers with karma: 36 on 2016-05-12

Post score: 1


Original comments

Comment by ahendrix on 2016-05-12:
It looks like there's an error in your CMakeLists.txt. Please edit your question to include your edited CMakeLists.txt . It would also be useful to include a link to the tutorial you followed.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

That is correct. I put find_package(Boost REQUIRED COMPONENTS roscpp) instead of find_package(catkin REQUIRED COMPONENTS roscpp). My bad. Thank you!


Originally posted by k with karma: 36 on 2016-05-16

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by neuronet on 2016-07-24:
This was helpful to me, as for some reason I think ROS puts in Boost by default in its text files, this is sort of asking for trouble, so good that you swallowed your pride and put this here for me to find!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.