I'm trying to use some boost functions in my C++ ROS code, but running into some frustrating issues with catkin.
In my CMakeLists.txt file, I have the following:
cmake_minimum_required(VERSION 2.8.3)
project(project_name)
find_package(
catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
Boost
)
include_directories(
include ${catkin_INCLUDE_DIRS} ${roscpp_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
)
add_executable(exec_name src/exec_name.cpp)
target_link_libraries(exec_name ${catkin_LIBRARIES})
And I have installed libboost-all-dev
on my Ubuntu 14.04 machine with apt-get
. When I try to compile my project, however, I get the following error:
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:75 (find_package): Could not find a package configuration file provided by "Boost" with any of the following names:
BoostConfig.cmake boost-config.cmake
Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
"Boost_DIR" to a directory containing one of the above files. If "Boost"
provides a separate development package or SDK, be sure it has been
installed.
I have searched all the files on the machine and cannot find anywhere a file named "BoostConfig.cmake" or "boost-config.cmake", are they something that should be included when I installed Boost through apt-get? If anyone could help me figure out why CMake can't find Boost, it would be hugely appreciated.
Originally posted by Jordan9 on ROS Answers with karma: 113 on 2015-04-09
Post score: 1