我正在尝试在Windows10上用CMake构建HPX (最终的目标是用MSVC构建OpenCV )。
我已经下载了Boost 1.75.0,然后从管理命令行运行了bootstrap.bat和b2.exe。然后,我将路径添加到boost文件夹的path变量。接下来,我打开CMake并尝试构建HPX1.3.0,得到以下错误:
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Boost (missing: filesystem program_options system) (found
suitable version "1.75.0", minimum required is "1.61")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:2193 (find_package_handle_standard_args)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)请帮帮我!
发布于 2021-01-06 06:23:59
看起来CMake找到了Boost头文件,但没有找到Boost二进制文件。我会尝试显式地设置指向相应目录的BOOST_INCLUDEDIR和BOOST_LIBRARYDIR CMake变量。有关可以设置的更多CMake变量,请参见https://cmake.org/cmake/help/latest/module/FindBoost.html。
还要注意,日志中发出的警告是良性的,是由CMake版本低于Boost V1.75引起的。
https://stackoverflow.com/questions/65580165
复制相似问题