问题描述
我正在尝试运行一个使用mex编译一些c ++代码的代码.我已经使用Microsoft Visual C ++ 2010设置了mex.但是当我执行该行
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
我得到了错误
compile
Usage:
MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]
Use the -help option for more information, or consult the MATLAB API Guide.
C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Unrecognized switch: -o.
我在Google上搜索了很多,但找不到任何用处.如果您能在这里帮助我,那将是很棒的.我对使用mex的了解非常有限.
I have googled a lot but couldn't find anything of use. It would be great if you someone could help me out here. I have very limited knowledge of using mex.
推荐答案
来自 mex
的R2013a文档(和当前版本),没有-o
选项,但是有-output
:
From the R2013a docs for mex
(and current version), there is no -o
option, but there is -output
:
顺便说一句,除非您使用-g
,否则默认情况下大O选项(-O
)处于启用状态.
BTW, the big O option (-O
) is on by default unless you use -g
.
请记住,mex
不是编译器,而是编译器的前端.它的语法与用于编译器的语法完全不同.
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.
这篇关于使用MATLAB2013a的mex无法识别的开关:-o的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!