embotech / Y2F

YALMIP to FORCESPRO interface
MIT License
9 stars 3 forks source link

Compilation does not work in Matlab R2016a on Mac #21

Closed g-ulli closed 5 years ago

g-ulli commented 5 years ago

Compilation fails with

Reference to non-existent field 'folder'.

Error in optimizerFORCES/compileSolverInterfaceCode>@(x)[x.folder,filesep,x.name] (line 146)
        objFiles = arrayfun(@(x) [x.folder filesep x.name], objFiles, 'UniformOutput', false); % cell array with paths

Error in optimizerFORCES/compileSolverInterfaceCode (line 146)
        objFiles = arrayfun(@(x) [x.folder filesep x.name], objFiles, 'UniformOutput', false); % cell array with paths

Error in optimizerFORCES (line 389)
compileSolverInterfaceCode(sys);

Error in mpc_basic_example (line 79)
controller = optimizerFORCES(const, cost, codeoptions, X(:,1), U(:,1), {'xinit'}, {'u0'});

This is likely due to a fix for newer Matlab versions introduced with 234ff1e47a5cd592c8445a5854046f1a0ecc7246. The fix is based on the dir function, which changed functionality in version R2016b. Before that version, the dir command did not support wildcards on all systems (see https://ch.mathworks.com/help/matlab/release-notes.html?s_tid=mwa_osa_a#container-bva30ad).

g-ulli commented 5 years ago

Solved in v0.1.15