robotology / osqp-eigen

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

when i build this project, this error occurs. My osqp is version 0.4.1. #70

Closed Leon-LXA closed 3 years ago

Leon-LXA commented 3 years ago

make
Scanning dependencies of target OsqpEigen [ 25%] Building CXX object CMakeFiles/OsqpEigen.dir/src/Data.cpp.o [ 50%] Building CXX object CMakeFiles/OsqpEigen.dir/src/Settings.cpp.o [ 75%] Building CXX object CMakeFiles/OsqpEigen.dir/src/Solver.cpp.o /home/ruoyo/Apps/osqp-eigen/src/Solver.cpp: In member function ‘bool OsqpEigen::Solver::initSolver()’: /home/ruoyo/Apps/osqp-eigen/src/Solver.cpp:83:44: error: cannot convert ‘OSQPWorkspace’ to ‘const OSQPData’ for argument ‘1’ to ‘OSQPWorkspace osqp_setup(const OSQPData, OSQPSettings)’ m_settings->getSettings()) != 0 ){ ^ CMakeFiles/OsqpEigen.dir/build.make:110: recipe for target 'CMakeFiles/OsqpEigen.dir/src/Solver.cpp.o' failed make[2]: ** [CMakeFiles/OsqpEigen.dir/src/Solver.cpp.o] Error 1 CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/OsqpEigen.dir/all' failed make[1]: [CMakeFiles/OsqpEigen.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

traversaro commented 3 years ago

Which version of OSQP are you using? Which version of osqp-eigen?

traversaro commented 3 years ago

Sorry, I did not see the title. I guess that the master branch is not compatible with OSQP 0.4.1 , I guess you should try the appropriate version: https://github.com/robotology/osqp-eigen/releases/tag/v0.4.1 .

Leon-LXA commented 3 years ago

Which version of OSQP are you using? Which version of osqp-eigen?

i use OSQP version 0.4.1 , because i dont know why i cant use the latest OSQP version.

Leon-LXA commented 3 years ago

Sorry, I did not see the title. I guess that the master branch is not compatible with OSQP 0.4.1 , I guess you should try the appropriate version: https://github.com/robotology/osqp-eigen/releases/tag/v0.4.1 .

thx bro , i'll try