When compiling applications built in MATLAB with mcc from the Matlab Compile toolbox:
mcc -m -R -nojvm filename.myou may receive an error such as "Cannot find authentication file" and the exception "ErrInvalidMEXFile".
This happens because Gurobi does not produce any authentication files. In this case, you can:
- Copy all Gurobi
mexw64files (from${GUROBI_HOME}/matlab) to the path of themfile you are trying to compile. - Do not add
addpathin the code itself.