声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2282|回复: 9

[混合编程] 求救,关于COM组件

[复制链接]
发表于 2007-5-19 19:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
>> mex -setup
Please choose your compiler for building external interface (MEX) files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:
[1] Digital Visual Fortran version 6.0 in C:\Program Files\Microsoft Visual Studio
[2] Lcc C version 2.4 in F:\MATLAB7\sys\lcc
[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio

[0] None

Compiler: 3

Please verify your choices:

Compiler: Microsoft Visual C/C++ 6.0
Location: C:\Program Files\Microsoft Visual Studio

Are these correct?([y]/n): y

Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14\mexopts.bat
From template:              F:\MATLAB7\BIN\WIN32\mexopts\msvc60opts.bat

Done . . .

>> >> mbuild -setup
Please choose your compiler for building standalone MATLAB applications:

Would you like mbuild to locate installed compilers [y]/n? y

Select a compiler:
[1] Lcc C version 2.4 in F:\MATLAB7\sys\lcc
[2] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio

[0] None

Compiler: 2

Please verify your choices:

Compiler: Microsoft Visual C/C++ 6.0
Location: C:\Program Files\Microsoft Visual Studio

Are these correct?([y]/n): y

Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14\compopts.bat
From template:              F:\MATLAB7\BIN\WIN32\mbuildopts\msvc60compp.bat

Done . . .


--> "F:\MATLAB7\bin\win32\mwregsvr F:\MATLAB7\bin\win32\mwcomutil.dll"

DllRegisterServer in F:\MATLAB7\bin\win32\mwcomutil.dll succeeded

--> "F:\MATLAB7\bin\win32\mwregsvr F:\MATLAB7\bin\win32\mwcommgr.dll"

DllRegisterServer in F:\MATLAB7\bin\win32\mwcommgr.dll succeeded


按照这个设置了以后打开comtool
build-COM object 以后还是出现
Building COM object...
mcc -M -silentsetup -d 'F:/MATLAB7/work/a/src'  -B 'ccom:a,aclass,1.0' -g -i 'C:/Documents and Settings/Administrator/My Documents/030150102/丁/yy.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: No matching builtin function available for F:/MATLAB7/toolbox/simulink/simulink/set_param.bi
> In <a href="error:F:/MATLAB7/toolbox/compiler/cmptool.m,1032,1">cmptool>build at 1032</a>
  Could not find the compiler "cl" on the DOS path.
  Use mbuild -setup to configure your environment properly.


  F:/MATLAB7/BIN/WIN32/MEX.PL: Error: Unable to locate compiler.

??? Error using ==> mbuild
Unable to complete successfully
应该怎么办呢,弄了很久,有重装了一遍还是不行,求救啊
回复
分享到:

使用道具 举报

发表于 2007-5-19 19:47 | 显示全部楼层
原帖由 冰冻公主 于 2007-5-19 19:44 发表
>> mex -setup
Please choose your compiler for building external interface (MEX) files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:
[1] Digital Visual  ...



设置顺序:先 mbuild 再 mex
 楼主| 发表于 2007-5-19 19:51 | 显示全部楼层
谢谢你,按照你的方法我试了一下
还是不行,这又怎么办呢
Building COM object...
mcc -M -silentsetup -d 'F:/MATLAB7/work/bb/src'  -B 'ccom:bb,bbclass,1.0' -g -i 'C:/Documents and Settings/Administrator/My Documents/030150102/丁/yy.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: No matching builtin function available for F:/MATLAB7/toolbox/simulink/simulink/set_param.bi
> In <a href="error:F:/MATLAB7/toolbox/compiler/cmptool.m,1032,1">cmptool>build at 1032</a>
  Could not find the compiler "cl" on the DOS path.
  Use mbuild -setup to configure your environment properly.


  F:/MATLAB7/BIN/WIN32/MEX.PL: Error: Unable to locate compiler.

??? Error using ==> mbuild
Unable to complete successfully
发表于 2007-5-19 19:57 | 显示全部楼层
Could not find the compiler "cl" on the DOS path


版面搜索一下以上内容,我记得以前讨论过这个问题
 楼主| 发表于 2007-5-19 20:08 | 显示全部楼层
我是初学者,看不太明白啊....我现在用matlab编了M文件,现在用VB做界面,因为还传递函数图象的,上网查了要用COM做VB和MATLAB的接口,现在COM做不了啊,一天了也不知道怎么解决,还有我想问下用COM现在是最新的方法是吗?用别的很复杂?
发表于 2007-5-19 20:16 | 显示全部楼层
原帖由 冰冻公主 于 2007-5-19 20:08 发表
我是初学者,看不太明白啊....我现在用matlab编了M文件,现在用VB做界面,因为还传递函数图象的,上网查了要用COM做VB和MATLAB的接口,现在COM做不了啊,一天了也不知道怎么解决,还有我想问下用COM现在是最新的 ...


就是让你利用论坛搜索的功能搜索以下内容:Could not find the compiler "cl" on the DOS path
 楼主| 发表于 2007-5-19 20:19 | 显示全部楼层
是不是因为没有安装在系统盘下的问题呢,我的是装在F:\MATLAB这里,选择N然后输入的路径应该是什么呢?
发表于 2007-5-19 20:27 | 显示全部楼层
原帖由 冰冻公主 于 2007-5-19 20:19 发表
是不是因为没有安装在系统盘下的问题呢,我的是装在F:\MATLAB这里,选择N然后输入的路径应该是什么呢?


估计不是。

怎么我告诉你自己动手搜索一下,你就不去做呢?参考以下帖子:http://www.chinavib.com/forum/archiver/?tid-29598.html
 楼主| 发表于 2007-5-19 20:33 | 显示全部楼层
我搜索了,也看了,好像和我的不怎么一样啊,我就是装了典型安装的MATLAB7.0,装了VB6.0的软件,其他的没有装,用COM是不是还要装其他的东西呢》他们说的msvc60是什么呢?
发表于 2007-5-28 21:35 | 显示全部楼层
你作成com组件能够调用了吗?我的qq:39353352
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-18 09:43 , Processed in 0.106475 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表