Build MATLAB interface from sources and binaries

Hi,
I’m trying to build MATLAB interface from sources by following your instructions. On build step I get the following errors:
C:\osqp-matlab\osqp_mex.cpp(298): error C2660: ‘osqp_setup’: function does not take 2 arguments
C:\osqp-matlab\osqp_mex.cpp(1072): error C2440: ‘type cast’: cannot convert from ‘double’ to ‘linsys_solver_type’
and multiple warnings.

The version from binaries does not support FLOAT and LONG options in codegen functions - I believe it is not updated to newest version.

Thank you and best regards
Goran Josipovic

Judging by your compiler output it looks like you are using Visual Studio, correct?

The first error (C2660) seems to be a mismatch between code versions. I would suggest downloading the most recent master commit from GitHub (and be sure to download the osqp_sources and qdldl submodules at the version linked to by GitHub). I believe that should fix the error.

(continued from above post due to link posting limitation)

There was a recent patch to the code to fix the 2nd error you are seeing (C2440), but it is not yet in master (it is in the v6 dev branch). The fix can be seen here, so you could just copy the new line containing the (c_int) statement into osqp_mex.cpp to replace the old line. Alternatively you could try downloading the develop branch, but it might not be completely stable since it is under active development.