主题:[讨论]matlab2008a与VC++6.0生成COM组件,出错
想matlab2008a和VC++6.0(中文版)生成COM组件,电脑操作系统是win7 64位,VC++6.0有点不兼容,但也能运行。
系统自带了VC++2005和VC++2010插件。操作如下
打开matlab进行编译器设置时,输入mbuild -setup,显示的编译器为:
Select a compiler:
[1] Microsoft Platform SDK 14.0
[2] Microsoft Visual C++ 2005
[3] Microsoft Visual C++ 2008
[0] None
系统安装了VC++6.0,却没有识别。
但是Microsoft Visual C++ 2005和Microsoft Visual C++ 2008都没有安装,因此我选择[2] Microsoft Visual C++ 2005。
由于系统没有安装[2] Microsoft Visual C++ 2005 ,所以找不到Microsoft Visual Studio\VC98\INCLUDE;所以我在设置VC++的include 和 liabrary DIRECTORY 时,写成了VC++6.0的这两个路径了。
但是在build的时候出错,错误提示为:
mcc -F 'D:\nnforcast\procast\procast.prj'
mcc -W 'com:procast,procastclass,1.0' -d 'D:\nnforcast\procast\procast\src' -T 'link:lib' -C -M -ID:\Program Files\Microsoft Visual Studio\VC98\INCLUDE -M -LD:\Program Files\Microsoft Visual Studio\VC98\LIB 'class{procastclass:D:\nnforcast\nnforcast.m}' -a 'D:\nnforcast\cf.mat' -a 'D:\nnforcast\ex.mat' -a 'D:\nnforcast\o2.mat'
mwcomtypes.idl
D:\PROGRA~2\MATLAB\R2008A\BIN\MEX.PL: Error: IDL compile of 'mwcomtypes.idl' failed.
Error: An error occurred while shelling out to mbuild (error code = 9).
Unable to build executable (specify the -v option for more information).
??? Error using ==> mcc
Error executing mcc, return status = 1.
There were errors during compilation process.
应该不是因为VC++是中文版的原因吧?因为在老师的电脑上也是中文版的,却能够生成这个COM组件呢。
大牛们帮忙给看下这是什么错误啊?