|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
我现在需要弄的是Matlab与VB6.0的混合编程,但是在编译上出现了问题,我之前看过一个帖子说要先装编译器,我的电脑上已经安装VB,运行了mbuild -setup,但在选择上只出现了,Select a compiler:
[1] Lcc C version 2.4 in E:MATLAB7syslcc
[0] None
Compiler: 1
弄完这个后,我进行编译,但是仍然出现
Building COM object...
mcc -M -silentsetup -d 'E:/MATLAB7/work/mccom/src' -B 'ccom:mccom,mccomclass,1.0' -i 'E:/MATLAB7/work/mcomputer.m'
To get started, select <a href="matlab: doc">MATLAB Help</a> or <a href="matlab: demo matlab">Demos</a> from the Help menu.
The -i switch is no longer supported; the include exported interfaces behavior
is applied to every compilation.
Warning: (PM): Duplicate directory name: E:/MATLAB7/work.
Warning: No matching builtin function available for E:/MATLAB7/toolbox/simulink/simulink/set_param.bi
> In <a href="error:E:/MATLAB7/toolbox/compiler/cmptool.m,1032,1">cmptool>build at 1032</a>
E:/MATLAB7/BIN/WIN32/MEX.PL: Error: The chosen compiler does not support building COM objects.
Please see the MATLAB Add-in for Excel documentation for the latest list of supported compilers.
??? Error using ==> mbuild
Unable to complete successfully
我的matlab是7.0,系统是Vista。同样,我在别人的电脑上,装的matlab7.5,虽然程序编译了,但是却无法安装该组件,而且7.5的版本在编译的工具和7.0差别很大,用起来更加不会,和网站上的视频教程也不一样。
从警告中说我使用了simulink实际上是没有的,所以我把我的m文件也弄给大家
function result=mcomputer(A,B,flags)
switch flags
case 0
result=A+B;
case 1
result=A-B;
case 2
result=A*B;
end |
|