0

我试图在 Debian-9 上使用“make”安装一个 .pro 文件。依赖项是 Qt5、GSL、libigl、Eigen 和 Boost,安装了它们的最新版本。我使用了以下内容:

# cd build
# qmake -qt=qt5 ../qt/myfile.pro
# make

这是我得到的错误:

../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.cpp:203:36: error: ‘Eigen::PlainObjectBase<Derived>::PlainObjectBase() [with Derived = Eigen::Matrix<int, -1, 1>]’ is protected within this context
   Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
                                    ^~~~~~~~~~~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:457:0,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:15,
                 from ../src/mesh.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:484:25: note: declared protected here
     EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()
                         ^~~~~~~~~~~~~~~
In file included from ../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.h:75:0,
                 from ../libigl/include/igl/copyleft/boolean/../cgal/propagate_winding_numbers.cpp:18,
                 from ../libigl/include/igl/copyleft/boolean/../cgal/propagate_winding_numbers.h:101,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.cpp:13,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:172,
                 from ../src/mesh.cpp:12:
../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.cpp:203:52: error: ‘Eigen::PlainObjectBase<Derived>::PlainObjectBase() [with Derived = Eigen::Matrix<int, -1, 1>]’ is protected within this context
   Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
                                                    ^~~~~~~~~~~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:457:0,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:15,
                 from ../src/mesh.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:484:25: note: declared protected here
     EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()
                         ^~~~~~~~~~~~~~~
Makefile:891: recipe for target 'mesh.o' failed

有人可以帮我解决这里的问题吗?

4

1 回答 1

1

这条线

Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;

不会编译。它可能曾经为较旧的 Eigen 版本编译过——但这不是应该使用 Eigen-Base 类型的方式,因此它可能从未按预期工作(这也是 Base-constructors 在 Eigen 中受到保护的原因) .

但是,最近的order_facets_around_edge.cpp中不存在该行,因此您似乎使用的是过时的 libigl 版本。

于 2020-01-07T10:19:00.367 回答