I am trying to compile mlpack (http://www.mlpack.org/) which requires boost. First I installed boostpro 1.51 (http://www.boostpro.com/download/) and boost is now installed in C:\Program Files\boost\boost_1_51
Then I compiled and installed armadillo (another dependancy of mlpack) using cmake and mingw32-make. Boost is also a dependency of armadillo. Following some advises (Cmake doesn't find Boost), I added to the CMakeLists file:
SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:\\Program Files\\boost\\boost_1_51")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:\\Program Files\\boost\\boost_1_51\\lib")
Things went smoothly.
Now I am trying to run CMake on mlpack but get this error:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoos t.cmake:1192 (message): Unable to find the requested Boost libraries.
Boost version: 1.51.0
Boost include path: C:/Program Files/boost/boost_1_51
The following Boost libraries could not be found:
boost_program_options 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:192 (find_package)
I tried to add (as for armadillo), but no improvement:
SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:\\Program Files\\boost\\boost_1_51")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:\\Program Files\\boost\\boost_1_51\\lib")
Then I tried to add as well:
set(BOOST_ROOT "C:\\Program Files\\boost\\boost_1_51")
set(BOOST_INCLUDEDIR "C:\\Program Files\\boost\\boost_1_51")
set(BOOST_LIBRARYDIR "C:\\Program Files\\boost\\boost_1_51\\lib")
For the BOOST_INCLUDEDIR, I really do not know which folder I should point too. boost_1_51 contains: bin, boost, dist, doc, lib, libs, more
I also tried this (cmake is using the wrong cboost libs), without success.
I am also a little confused as armadillo seemed to have compiled without issues (or I missed something ?)
Many thanks
Note: content of the cmakelists file:
#Unfortunately this configuration variable is necessary and will need to be
#updated as time goes on and new versions are released.
set(Boost_ADDITIONAL_VERSIONS "1.41" "1.41.0" "1.42" "1.42.0" "1.43" "1.43.0" "1.44" "1.44.0" "1.45.0" "1.46.0" "1.46.1" "1.47.0" "1.48.0" "1.49.0" "1.51.0")
find_package(Boost
COMPONENTS
program_options
unit_test_framework
REQUIRED
)
include_directories(${Boost_INCLUDE_DIRS})
I added 1.51.0 myself.
from what I understood from another post (CMake not finding Boost) this might be related to not finding libraries with correct names. In my lib folder I have (dll and lib files):
boost_program_options-vc80-mt-1_51.dll
boost_program_options-vc80-mt-gd-1_51.dll
boost_program_options-vc100-mt-1_51.dll
boost_program_options-vc100-mt-gd-1_51.dll
somehow I am supposed to play with commands like
set(Boost_USE_MULTITHREADED ON)
so that it will look for the lib with the expected name ????