【发布时间】:2018-11-30 06:43:39
【问题描述】:
我正在尝试使用 Beast 制作一个 CMake 项目,它已从 /usr/local/include/boost 中的源代码正确安装,但我无法让 CMake 找到它。我虽然可能是3.10.2,所以我厌倦了3.11.4 和3.12.0-rc1,但都没有用。有谁知道该怎么做?
环境:Windows CLion 2018.1.5 和 WSL 上的 Ubuntu 18.04LTS。
尝试运行 CMake 时,我收到以下错误:
CMake Warning at /home/aidan/Apps/cmake-3.11.4-Linux-x86_64/share/cmake-3.11/Modules/FindBoost.cmake:1723 (message):
No header defined for beast; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
CMake Error at /home/aidan/Apps/cmake-3.11.4-Linux-x86_64/share/cmake-3.11/Modules/FindBoost.cmake:2044 (message):
Unable to find the requested Boost libraries.
Boost version: 1.67.0
Boost include path: /usr/local/include
Could not find the following Boost libraries:
boost_beast
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, 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:15 (find_package)
【问题讨论】:
-
Boost Beast 是一个只有头文件的库。所以从
find_package(Boost COMPONENTS ... REQUIRED)调用中删除beast。 -
@vre 哦,太酷了!您要回答吗,以便我将其标记为正确?
-
很高兴它能帮助您解决问题。如果它完全回答了您的问题,请接受它。
-
@vre 是的,效果很好!
标签: ubuntu boost cmake boost-beast beast-websockets