Problems with Installation

Hi there,

I came across this solver because I needed to solve large scale quadratic programming problems in Matlab (thousands and tens of thousands of constraints). It seems that osqp is very fast based on an example I tried! However, I immediately ran into a number of problems. [I am a frequent Matlab user, but otherwise know little about C/C++].

  1. For me, I only needed to solve least square type quadratic optimization problems at this point (and maybe LASSO in future). Do I really need to do everything on this page (websave(‘install_osqp.m’, ‘’);
    install_osqp) for my purpose? I am asking because I managed to try the toy example in Matlab R2019b (Windows 10) after running the commands:

websave(‘install_osqp.m’, ‘’);

  1. An error occurred when I try to re-solve my problem in the toy code (by clicking “Evaluate Selection” in Matlab), which reads:

Error using osqp_mex
Solver is already initialized with problem data.

Error in osqp/setup (line 274)
[varargout{1:nargout}] = osqp_mex(‘setup’, this.objectHandle, n,m,P,q,A,l,u,theSettings);

This is important to me because I need to solve quadratic programming in a for-loop.

  1. So I thought perhaps I need to go through the whole installation procedure. Then another issue occurred as I tried to run the command:

cmake -G “MinGW Makefiles” …

This is after I installed C/C++ compiler, TDM-GCC and CMake, following the given links. And the error message is:

– The C compiler identification is unknown
– The CXX compiler identification is unknown
– Check for working C compiler: C:/TDM-GCC-64/bin/gcc.exe
– Check for working C compiler: C:/TDM-GCC-64/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler


is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Windows/System32/osqp/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/TDM-GCC-64/bin/mingw32-make.exe cmTC_9784c/fast && mingw32-make.exe: *** No rule to make target 'cmTC_9784c/fast'.  Stop.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (project)

– Configuring incomplete, errors occurred!
See also “C:/Windows/System32/osqp/build/CMakeFiles/CMakeOutput.log”.
See also “C:/Windows/System32/osqp/build/CMakeFiles/CMakeError.log”.

Sorry for the long question. I was very excited about this solver, thinking to myself that this could be introduced to students in class as we often encounter large scale optimization problems.

Any help/comments would be much appreciated.