Compiling MATLAB, YALMIP and CPLEX , Syntax error

7 views (last 30 days)
I'm trying to compile a matlab script with CPLEX and YALMIP as a standalone executable using the mcc command. I'm using matlab R2016b on a 64 bit linux system with the latest YALMIP version and CPLEX 12.7. I Receive the following error
mcc -mv file.m -I /home/user/yalmipdirectories -I /home/user/cplexdirectory -a /call_cplexibm_qcmiqp.m -a /cplexqcp.m -a /cplexlink1271.mexa64
Compiler version: 6.3 (R2016b) Dependency analysis by REQUIREMENTS. Error using matlab.depfun.internal.cacheMtree (line 29) MATLAB code '/home/user/CPLEX_Studio/cplex/matlab/x86-64_linux/cplexmilp.m' contains the following syntax error(s): L 56 (C 1): SYNER: Parse error at '.': usage might be invalid MATLAB syntax.
Error in isClassdef>hasClassDef (line 37) mt = matlab.depfun.internal.cacheMtree(file);
Error in isClassdef (line 21) tf = hasClassDef(file);
Error in className_impl (line 118) elseif isClassdef(whichResult)
Error in className (line 13) [name, clsFile] = className_impl(whichResult);
Error in matlab.depfun.internal.MatlabSymbol/determineClassType (line 750) [name, clsFile] = className(symObj.WhichResult);
Error in matlab.depfun.internal.MatlabSymbol/getTypeUsingEnvironment (line 714) determineClassType(symObj);
Error in matlab.depfun.internal.MatlabSymbol/determineMatlabType (line 652) getTypeUsingEnvironment(symObj);
Error in matlab.depfun.internal.MatlabSymbol/determineSymbolType (line 841) determineMatlabType(symbol);
Error in matlab.depfun.internal.MwFileInspector/evaluateSymbols (line 293) determineSymbolType(symObj, obj.fsCache, obj.addExclusion);
Error in matlab.depfun.internal.MwFileInspector/analyzeSymbol (line 34) evaluateSymbols(obj, symlist, client);
Error in matlab.depfun.internal.Completion/findDependentFiles (line 1349) analyzeSymbol(inspector, symbol);
Error in matlab.depfun.internal.Completion/computeDependencies (line 263) findDependentFiles(obj);
Error in matlab.depfun.internal.Completion/computePartsList (line 2012) computeDependencies(obj);
Error in matlab.depfun.internal.Completion/requirements (line 2412) parts = computePartsList(obj, false);
Error in matlab.depfun.internal.requirements (line 215) [parts, resources.products, resources.platforms] = c.requirements();
Unexpected error while determining required deployable files. Compilation terminated.
Can anyone help me with this? So far I have been unable to create a working executable with YALMIP only, adding CPLEX seems to cause the problem.

Answers (1)

Arnav Mendiratta
Arnav Mendiratta on 13 Jun 2017
The error happens is the third party file:
'/home/user/CPLEX_Studio/cplex/matlab/x86-64_linux/cplexmilp.m'
This is not a MahtWorks' shipped file. Make sure you are using supported MATLAB version with CPLEX. Error seems to point out that some functionality changed with the older/newer release of MATLAB.
Reach out to the IBM team for help with this specific file.

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!