简体   繁体   中英

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

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM