Point Cloud Library を使用しています。このライブラリは、一部のメソッドに Eigen3 ライブラリを使用しています。プロジェクトをコンパイルしようとしましたが、解決できないコンパイル エラーがいくつかあります。エラーは次のとおりです。
Error: Expected unqualified-id before numeric constant
ここで解決策を既に検索しましたが、私の条件は異なります。エラースタックは次のとおりです。
In file included from /usr/include/eigen3/Eigen/IterativeLinearSolvers:34:0,
from /usr/include/eigen3/Eigen/Sparse:24,
from /usr/include/pcl-1.7/pcl/features/eigen.h:49,
from /usr/include/pcl-1.7/pcl/features/principal_curvatures.h:44,
from /home/PROJECTS/Pipeline/include/mypcl.h:31,
from /home/PROJECTS/Pipeline/include/elementset.h:24,
from /home/PROJECTS/Pipeline/data.h:24,
from /home/PROJECTS/Pipeline/inputhandler.h:16,
from /home/PROJECTS/Pipeline/inputhandler.cpp:1:
/usr/include/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h: In function ‘void Eigen::internal::conjugate_gradient(const MatrixType&, const Rhs&, Dest&, const Preconditioner&, int&, typename Dest::RealScalar&)’:
/usr/include/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h:38:14: error: expected unqualified-id before numeric constant
問題のあるコードは次のとおりです。
using std::sqrt;
using std::abs;
typedef typename Dest::RealScalar RealScalar;
typedef typename Dest::Scalar Scalar;
typedef Matrix<Scalar,Dynamic,1> VectorType;
RealScalar tol = tol_error; <-- ERROR
int maxIters = iters;
int n = mat.cols();
VectorType residual = rhs - mat * x; //initial residual
最も問題なのは、このコードが私のものではなく、数週間前に実行されたことです。数日前に自動更新をいくつか行いましたが、このエラーに関連しているかどうかはわかりません。
なにか提案を?
前もって感謝します。