在编译时从gmp构建CGAL测试代码错误时。

时间:2018-07-23 14:10:28

标签: c++ compiler-errors gmp

在安装了gmp-10.2.0的ubuntu 16.04上

我安装了CGAL,并粘贴了两个代码示例以开始使用。简而言之:

#include <CGAL/Exact_spherical_kernel_3.h>
int main() {
  return 0;
}

g ++ mwe.cc导致以下错误:

In file included from /usr/include/CGAL/is_convertible.h:28:0,
                 from /usr/include/CGAL/Rational_traits.h:31,
                 from /usr/include/CGAL/number_type_basic.h:48,
                 from /usr/include/CGAL/basic.h:44,
                 from /usr/include/CGAL/Cartesian/Cartesian_base.h:28,
                 from /usr/include/CGAL/Cartesian.h:28,
                 from /usr/include/CGAL/Exact_spherical_kernel_3.h:27,
                 from mwe.cc:1:
/usr/include/gmpxx.h: In static member function ‘static int __gmp_cmp_function::eval(mpq_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:893:26: error: ‘mpq_cmp_z’ was not declared in this scope
   { return mpq_cmp_z(q, z); }

                      ^

怎么了?找到gmpxx.h。我看不到任何#include失败。

0 个答案:

没有答案