Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake: can't find boost 1_60_0 (version.hp not found)

Tags:

c++

boost

cmake

I am trying to compile a program using Boost with CMake under Mac OS X.

I have got the following error:

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindBoost.cmake:721 (file): file STRINGS file "/Users/.../src/boost_1_60_0/boost/boost/version.hpp" cannot be read. Call Stack (most recent call first): CMakeLists.txt:44 (find_package)

Boost version: 0.0.0

Indeed, when I go inside boost_1_60_0/boost, there isn't a folder called boost.

Is my FindBoost not up-to-date?

like image 845
guhur Avatar asked Sep 25 '22 16:09

guhur


1 Answers

I beleive that you set your env wrong ! try to set entry BOOST_INCLUDE_DIR = "/Users/.../src/boost_1_60_0" It looks like you are getting it directly to /boost_1_60_0/boost which won't work as your CMAKE will look for the verion.hpp in BOOST_INCLUDE_DIR/boost/ folder.

BTW, are you sure that the version.hpp is not there ? that's strange !

Cheers

like image 123
Vtik Avatar answered Sep 28 '22 04:09

Vtik