ebertolazzi / mexIPOPT

MATLAB interface for IPOPT
107 stars 24 forks source link

bug with gcc>10 #22

Open ZichaoDi opened 1 year ago

ZichaoDi commented 1 year ago

The code doesn't work when compile with gcc version > 9 due to this part of code in ipopt.m elseif isunix if strcmp( cmp, 'GLNXA64') == 1 myCCompiler = mex.getCompilerConfigurations('C','Selected'); switch myCCompiler.Version(1:1) case {'1','2','3','4','5'} error('mexIPOPT do not support gcc < gcc6'); case {'6'} [x,info] = ipopt_linux_3(varargin{:}); case {'7','8'} [x,info] = ipopt_linux_4(varargin{:}); otherwise [x,info] = ipopt_linux_5(varargin{:}); end elseif strcmp( cmp, 'x86_64-pc-linux-gnu') == 1 % Octave [x,info] = ipopt_linux_5(varargin{:}); else error('IPOPT: No support for architecture %s\n', cmp ); end It only checks the first digit of the version so any version great than 9 won't work.

ebertolazzi commented 1 year ago

OK, for the moment you can try to remove the check of the GCC compiler (remove the check code). I am working on a new version that will support GCC > 9.