Home > front end >  MATLAB compilation
MATLAB compilation

Time:02-23

I'm try to compile a matlab project on RHEL 7.6, Whene I try to run the follow command:

mcc -m SliceViewerMain.m -a <PATH>/*.fig -a <PATH>/*.bmp -a <PATH>/*.m

I get this error:

Error: You specified the file "<PATH>/pause_e.bmp" without using the "-a" option.

Is anyone know why I get that?

CodePudding user response:

You don't specify, but I suspect you're using mcc at the shell command-prompt, rather than in MATLAB? In which case, the shell is expanding the * wildcard before mcc gets to see it, so it's as if you said:

$ mcc ... -a <PATH>/pause_a.bmp <PATH>/pause_b.bmp <PATH>/pause_c.bmp ...

The fix is either run the command inside MATLAB, or hide the wildcard expansion from the shell and let mcc expand by doing

$ mcc ... -a '<PATH>/*.fig' ...

I.e. use single quotes.

  • Related