BOOSTROOT for cmake on ubuntu

I installed boost through:

sudo apt-get install libboost-all-dev

Now I need to set BOOST_ROOT for cmake to be able to find Boost library. Where should this path be set to?

2 Answers

Actually, you do not need to set BOOST_ROOT. CMake can find Boost in its standard location. It worked for me on Ubuntu 12.04 LTS, with CMake version 2.8.7 and Boost 1.46.

Theoretically, BOOST_ROOT should be set to /usr if for some reason the above won't work.

Should you have a problem, then add -DBoost_DETAILED_FAILURE_MSG=TRUE to the cmake invocation (note the spelling!). This will print some moderately helpful error messages.

You can find where boost is using the command ldconfig -p | grep libboost

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like