我是Cmake的新手,用C++推动库.我正在开发一个需要提升和Cmake的项目.我使用的是Cmake版本2.8.11,MS Visual Studio 2013和Boost 1.54.0.当我尝试从Cmake配置时,它给出以下错误:
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1106 (message):
Unable to find the requested Boost libraries.
Boost version: 1.54.0
Boost include path: D:/boost_1_54_0
The following Boost libraries could not be found:
boost_thread
boost_system
boost_log
boost_log_setup
boost_program_options
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:20 (find_package)
Run Code Online (Sandbox Code Playgroud)
我已经看到了很多与我有关的问题并尝试过,但一切都是徒劳的.我的Cmakelists.txt文件如下所示:
################################
# Boost
################################
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
ADD_DEFINITIONS(-DBoost_USE_STATIC_LIBS=ON)
set_property(GLOBAL PROPERTY …Run Code Online (Sandbox Code Playgroud)