注册 登录
编程论坛 Matlab

[求助]把M文件编译成cpp文件出现的问题

wtzw 发布于 2006-09-26 17:30, 1056 次点击
设置编译环境,键入mbuild -setup
Please choose your compiler for building standalone MATLAB applications:

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

Select a compiler:
[1] Borland C++Builder version 6.0 in E:\Program Files\Borland
[2] Lcc C version 2.4 in E:\MATLAB6P5P1\sys\lcc

[0] None

Compiler: 1//我的机子装了Builder,因此我选了1

Please verify your choices:

Compiler: Borland C++Builder 6.0
Location: E:\Program Files\Borland

Are these correct?([y]/n): //按回车确认了

The default options file:
"C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R13\compopts.bat"
is being updated from E:\MATLAB6P5P1\BIN\WIN32\mbuildopts\bcc56compp.bat...


--> "E:\MATLAB6p5p1\bin\win32\mwregsvr E:\MATLAB6p5p1\bin\win32\mwcomutil.dll"
到这里就一直显示BUSY了。。。
之前有一次会继续显示下去,而且是成功的。
但是我不明白为什么前面会有一个default options file,在一个介绍里面也是说会出现这个。
我想知道怎么样才能顺利的设置好编译环境,不要老是死掉啊,MATLAT怎么那么容易Busy啊???

2 回复
#2
wtzw2006-09-26 17:32
还有,在上一次提示成功之后,
我按照看到的资料的方法继续设置编译环境,mex -setup
也顺利通过
但是在我开始编译我的文件的时候,系统提示了几个warning之后就又开始BUSY了,
可是我的文件不大啊,还不到100行,只不过里面有几个循环和两个作图而已
请教高手啊,小妹万分感激
#3
wtzw2006-09-27 17:43

今天又继续努力,比昨天稍稍又往下编译了一点,但是还是没有完全编译完就又BUSY了。贴一下这次的提示,哪位大侠来救我啊!
>> mcc -p -B sglcpp tx1:tx1是我的文件名。
Warning: File: stats/private/statsfminbx Line: 357 Column: 4
References to "xplot" will produce a run-time error because it is an undefined function or variable.
Warning: File: stats/private/statsfminbx Line: 198 Column: 10
References to "display1" will produce a run-time error because it is an undefined function or variable.
Warning: File: e:\matlab6p5p1\toolbox\matlab\iofun\textread.m Line: 158 Column: 80
The "which" function is only available in MEX mode. A run-time error will occur if this code is executed in stand-alone mode.
Warning: File: e:\matlab6p5p1\toolbox\matlab\iofun\textread.m Line: 159 Column: 19
The "which" function is only available in MEX mode. A run-time error will occur if this code is executed in stand-alone mode.

1