使用MATLAB2013a的mex无法识别的开关:-o [英] mex with MATLAB2013a Unrecognized switch: -o

查看:304
本文介绍了使用MATLAB2013a的mex无法识别的开关:-o的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行一个使用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

mex -O fconv.cc -o fconv

mex -O fconv.cc -o fconv

我得到了错误

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:

-output resultname 创建名为resultname的二进制MEX文件.自动附加适当的MEX文件扩展名.覆盖默认的MEX文件命名机制.

-output resultname Create binary MEX-file named resultname. Automatically appends the appropriate MEX-file extension. Overrides the default MEX-file naming mechanism.

顺便说一句,除非您使用-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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆