yb861215 发表于 2011-9-8 15:40:27

matlab编译M文件出错

我在编译M文件生成DLL时,一直出现如下错误:
If you don't have Administrator Privileges, you can try to register the component for you only with '/useronly' flag
C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: mwregsvr for C:\Documents and Settings\Administrator\桌面\M文件\mytool\src\mytool_1_0.dll failed. If you are not running MATLAB as Admin, start MATLAB as Admin or if you build with Deploytool, select 'Register the resulting component for you only on the development machine' in Project Settings->Advanced Tab, or specify '-u' switch in mcc command to register the resulting COM component for the current user only. See http://www.mathworks.com/help/toolbox/matlabxl/ug/bsl9h74.html#bst3f2f-1 for more information
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable.
我编译器选择的是VC++6.0,在另外一台电脑上也是出现同样错误,我以前成功编译过,不过系统重装后就不行了,求高手

Ro0o0o0okie 发表于 2011-9-8 19:00:17

mbuild -setup试过么

tanhao365 发表于 2011-9-19 15:22:30

matlab不要是64位的,我曾经尝试64位matlab编译出32位程序,安装VC6.0编译器的时候出现的就是这错误。另外mex –setup,mbuild –setup两个都不能少
页: [1]
查看完整版本: matlab编译M文件出错