'Eigen_solver_traits'没有命名类型?

时间:2015-07-26 17:04:24

标签: c++ typedef eigen cgal surface

我试图使用示例CGAL表面重建代码作为详细的here,但是当我尝试使用这行代码时:

Poisson_reconstruction_function function(points.begin(), points.end(),CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()) );

我收到此错误:

/usr/local/include/CGAL/Poisson_reconstruction_function.h: In member function ‘bool CGAL::Poisson_reconstruction_function<Gt>::compute_implicit_function(bool)’:
/usr/local/include/CGAL/Poisson_reconstruction_function.h:537:13: error: ‘Eigen_solver_traits’ does not name a type
 typedef Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;

有人知道为什么吗?

3 个答案:

答案 0 :(得分:1)

此特定错误通常意味着您需要添加var o = {}; o.dummy = function(path, encoding, cb){ return cb(null, "file content here " + path + " " +encoding); } Promise.promisifyAll(o); o.dummyAsync("a","b").then(function(data){ console.log("HI", data); }); // and not `_.partial` var part = _.bind(o.dummyAsync, o, "a1", "b2"); part().then(function(data){ console.log("Hi2", data); }); 。尝试

typename

或者,

typedef typename Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;
        ^^^^^^^^

答案 1 :(得分:0)

没关系,通过确保启用CGAL_EIGEN3_ENABLED来修复它。不过,再次感谢所有的帮助!

答案 2 :(得分:0)

使用cmake时,将以下行添加到CMakeLists文件中:

find_package(Eigen3 REQUIRED) include_directories( ${EIGEN3_INCLUDE_DIR} )