I am trying to run a code which compiles some c++ codes using mex. I have set up mex with Microsoft Visual C++ 2010. But when I execute the line
mex
From the R2013a docs for mex (and current version), there is no -o
option, but there is -output
:
-output resultname
Create binary MEX-file named resultname. Automatically appends the appropriate MEX-file extension. Overrides the default MEX-file naming mechanism.
BTW, the big O option (-O
) is on by default unless you use -g
.
Keep in mind that mex
is not a compiler, but a frontend to the compiler. It has very different syntax from what you might be used to for a compiler.