CMake的升压1.59.0几何 [英] CMake Boost 1.59.0 geometry

查看:168
本文介绍了CMake的升压1.59.0几何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是相当新的与C ++一起使用boost。我刚安装升压1.59.0,我想使用的几何库。

I am fairly new to using boost along with C++. I have just installed Boost 1.59.0 and I want to use the geometry library.

如果我包括 FIND_PACKAGE(升压1.47必填)发现振奋,没有问题就出现了。如果我再包括 FIND_PACKAGE(升压1.47组件几何必填)我收到以下错误:

If I include FIND_PACKAGE( Boost 1.47 REQUIRED ) it finds boost and no problems arises. If I then include FIND_PACKAGE( Boost 1.47 COMPONENTS geometry REQUIRED ) I get the following error:

 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.

如果我运行下面的 [-f /usr/include/boost/geometry/geometry.hpp&功放;&安培;回声找到||回声在CLI我得到找到结果未找到。如此看来,它的存在,但CMake的告诉我,事实并非如此。

If I run the following [ -f /usr/include/boost/geometry/geometry.hpp ] && echo "Found" || echo "Not found" in the CLI I get Found as a result. So it seems that it's there, but CMake tells me it's not.

我是什么误会?

推荐答案

组件只用于建库。几何所以它不是需要一个只有头库。你只需要找到升压头位置。

COMPONENTS is required only for built libraries. Geometry is an header-only library so it's not needed. You need only to find the boost headers location.

这篇关于CMake的升压1.59.0几何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆