我安装了多个版本的 Boost (Windows 7/MinGW)。我需要使用一个特定的(1.53.0)。
我在 CMakeFiles.txt 文件中定义了 BOOST_ROOT: SET(BOOST_ROOT C:/boost_1_53_0/)
,但我不断收到此错误:
> cmake .
BOOST_ROOT=C:/boost_1_53_0/
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1191 (message):
Unable to find the requested Boost libraries.
Boost version: 1.48.0
Boost include path: C:/Boost/include/boost-1_48
Detected version of Boost is too old. Requested version was 1.53 (or
newer).
The following Boost libraries could not be found:
boost_filesystem
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.
我还将 BOOST_ROOT 定义为环境变量,但结果相同。
为什么 cmake 还在寻找旧版本?