I am not able to figure out why am I getting this error.
CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1753 (message):
Unable to find the requested Boost libraries.
Boost version: 1.48.0
Boost include path: D:/Shark/boost_1_48_0
Could not find the following Boost libraries:
boost_system
boost_date_time
boost_filesystem
boost_program_options
boost_serialization
boost_thread
boost_unit_test_framework
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.
Call Stack (most recent call first):
CMakeLists.txt:146 (find_package)
CMake Error at CMakeLists.txt:154 (message):
Please make sure Boost 1.48.0 is installed on your system
It says, Unable to find requested boost library. But I have installed boost 1.48.0 and build it using Visual studio console, and have passed BOOST_LIBRARYDIR=D:/Shark/boost_1_48_0/stage/lib
and BOOST_ROOT=D:/Shark/boost_1_48_0
.
CMake's
FindBoost
macros look for the libs in various spots based on the compiler your using. Even if you specifyBOOST_LIBRARYDIR
, you still have to conform to the standards theFindBoost
macro expects for filenames ie:Example filenames matching this template for visual studio 2013 (aka msvc 12)
You'll note that the
mt
for multithreaded build and thegd
to indicate it's a debug build. FindBoost is fussy and will look for the debug build if your CMake project has a CMAKE_BUILD_TYPE=DebugAdditionally if your building multithreaded you'll need to define:
If your still having trouble you define:
Boost_DEBUG=1
and you'll see a lot of additional output about how and where FindBoost is searching.