robotology / osqp-eigen

Simple Eigen-C++ wrapper for OSQP library
https://robotology.github.io/osqp-eigen/
BSD 3-Clause "New" or "Revised" License
396 stars 118 forks source link

setHessianMatrix is deprecated #39

Closed ChiZhangCyngn closed 4 years ago

ChiZhangCyngn commented 4 years ago

Hi dear developers, I met the following error when I am working on a MPC problem with osqp-eigen. I followed the example to build the QP problem.

error: ‘bool OsqpEigen::Data::setHessianMatrix(const Eigen::SparseMatrix<Scalar>&) [with T = double]’ is deprecated: Use setHessianMatrix(const Eigen::SparseCompressedBase<Derived> &hessianMatrix) instead [-Werror=deprecated-declarations]
   if (!solver.data()->setHessianMatrix(Hessian_)) {

Do you know why I get this error?