0

I am attempting to use the example CGAL Surface Reconstruction code as detailed here, yet when I try to use this line of code:

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

I get this error:

/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;

Does anybody know why?

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055

3 Answers3

1

This particular error usually means you need to add a typename. Try

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

or perhaps,

typedef Eigen_solver_traits<Eigen::ConjugateGradient<typename Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;
                                                     ^^^^^^^^
jcai
  • 3,448
  • 3
  • 21
  • 36
0

Nevermind, fixed it by ensuring CGAL_EIGEN3_ENABLED was enabled. Thanks again however for all of the help!

0

When using cmake, add the following lines to your CMakeLists file:

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