[CMake] Fw : Linking boost failure

Philip Lowman philip at yhbt.com
Fri Dec 12 00:45:41 EST 2008


On Thu, Dec 11, 2008 at 10:09 AM, Mike Jackson
<mike.jackson at bluequartz.net>wrote:

> I just pulled down the BoostPro installer and installed the headers and a
> few libraries. I installed to C:\Developer\VS9\boost\boost_1_36_0.
>
> I then set the environment variable BOOST_ROOT to
> C:\Developer\VS9\boost\boost_1_36_0


The bug is when you don't set BOOST_ROOT.  It detects the headers
(Boost_INCLUDE_DIR) but not the libraries.  It should either detect both the
headers & libraries or fail miserably causing the user to discover
BOOST_ROOT.  See below for more info.

If you can add the following to your
> $CMAKE_INSTALL/share/cmake-2.6/modules/FindBoost.cmake at line 438:
>
>    message(STATUS "Boost_LIB_VERSION: ${Boost_LIB_VERSION}")
>    message(STATUS
> "${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}")
>    message(STATUS
> "${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}")
>    message(STATUS
> "${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}")
>    message(STATUS
> "${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}")
>    message(STATUS "${Boost_LIB_PREFIX}boost_${COMPONENT}")
>
> (there are 5 separate lines there. You may have to unwrap them from the
> email)
>
> Then run cmake again on a clean build directory and post the output.
>
> I get the following:
>
> -- Boost_LIB_VERSION: 1_36
> -- boost_program_options-vc90-mt-1_36
> -- boost_program_options-vc90-mt-1_36
> -- boost_program_options-mt
> -- boost_program_options-mt
> -- boost_program_options
>
> If your Boost_LIB_VERSION is empty then that is the first problem.


Here's the output (looks good).

Boost_LIB_VERSION: 1_36

boost_filesystem-vc80-mt-1_36

boost_filesystem-vc80-mt-1_36

boost_filesystem-mt

boost_filesystem-mt

boost_filesystem


 None of that output is the problem, here I think is the issue.  Somehow
Boost_FIND_VERSION_MAJOR, etc. looks to be being squashed?

_boost_LIBRARIES_SEARCH_DIRS =
C:/boost/lib;C:/boost;C:\Program Files/boost/boost___/lib;C:\Program
Files/Boost;/sw/local/lib

Here's the configuration:
CMake 2.6.2, BoostPro 1.36.0 (all VS8 libs installed), Visual Studio C++
2005 Express

Just unset BOOST_ROOT and hopefully you'll be able to reproduce it

CMakeLists.txt:
============
PROJECT(Foo)
FIND_PACKAGE(Boost COMPONENTS filesystem)

Cache variables are:
============
Boost_FILESYSTEM_LIBRARY_DEBUG = ...NOTFOUND
Boost_FILESYSTEM_LIBRARY_RELEASE = ...NOTFOUND
Boost_INCLUDE_DIR = C:/Program Files/boost/boost_1_36_0
Boost_LIB_DIAGNOSTIC_DEFINITIONS = -DBOOST_LIB_DIAGNOSTIC
Boost_USE_MULTITHREADED =On


-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081212/c38bf5e0/attachment.htm>


More information about the CMake mailing list