关于MATLAB Error: An error occurred while shelling out to mbuild

笔者的配置环境为MATLAB2013a,vs2010。打算将.m文件生成COM组件,但是遇到如下问题:

E:\MATLAB~1\BIN\MEX.PL: Error: The current options file is not configured to create DLLs. You can use mbuild -setup to set up an options file which is configured to create DLLs.  Error: An error occurred while shelling out to mbuild (error code = 9). Unable to build executable. ??? Error using ==> mccError executing mcc, return status = 1.

There were errors during compilation process. 


在网上各种找答案,均没有解决。最后没办法看官方的英文文档,找到了思路。

不用MATLAB自带的GUI,直接用命令生成COM组件。

例如 mcc -v -W 'com:my_xiaobo,myclass,1.0' -T link:lib xiaobo.m。

就可以生成名为my_xiaobo的COM组件,并且其类名为myclass,版本号为1.0,方法名为xiaobo。

成功解决问题。


如果出现Error: regsvr32 for   xx_1_0.dll failed.

则是由于权限不够,请用管理员权限运行。


如果你解决了问题,请告诉我,我们一起进步!

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值