【发布时间】:2015-11-21 12:33:08
【问题描述】:
我对将 boost 与 C++ 一起使用是相当陌生的。我刚刚安装了 Boost 1.59.0,我想使用几何库。
如果我包含FIND_PACKAGE( Boost 1.47 REQUIRED ),它会发现提升并且不会出现任何问题。如果我随后包含FIND_PACKAGE( Boost 1.47 COMPONENTS geometry REQUIRED ),则会收到以下错误:
Unable to find the requested Boost libraries.
Boost version: 1.59.0
Boost include path: /usr/include
Could not find the following Boost libraries:
boost_geometry
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.
如果我在 CLI 中运行以下 [ -f /usr/include/boost/geometry/geometry.hpp ] && echo "Found" || echo "Not found",我会得到 Found。所以它似乎在那里,但 CMake 告诉我它不是。
我误会了什么?
【问题讨论】:
标签: c++ boost boost-geometry