<P >本人在<FONT face="Times New Roman">Matlab</FONT>环境中配置<FONT face="Times New Roman">VC++</FONT>编译器时,<FONT face="Times New Roman">mex –setup</FONT>和<FONT face="Times New Roman">cd(prefdir)</FONT>命令都能运行,但输入<FONT face="Times New Roman">mccsavepath</FONT>命令后<FONT face="Times New Roman">Matlab</FONT>提示找不到这个函数,这是为什么呢?而且<FONT face="Times New Roman">mex –setup</FONT>运行后也不是显示“<FONT face="Times New Roman">Installing the MATLAB Visual Studio add-in</FONT>……”的信息,而是如下:</P>
<P ><FONT face="Times New Roman"> <p></p></FONT></P>
<P ><FONT face="Times New Roman">>> mex -setup</FONT></P>
<P ><FONT face="Times New Roman">Please choose your compiler for building external interface (MEX) files: </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Would you like mex to locate installed compilers [y]/n? y</FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Select a compiler: </FONT></P>
<P ><FONT face="Times New Roman">[1] Digital Visual Fortran version 6.0 in C:\Program Files\Microsoft Visual Studio </FONT></P>
<P ><FONT face="Times New Roman">[2] Lcc C version 2.4 in E:\MATLAB701\sys\lcc </FONT></P>
<P ><FONT face="Times New Roman">[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">[0] None </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Compiler: 3</FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Please verify your choices: </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Compiler: Microsoft Visual C/C++ 6.0 </FONT></P>
<P ><FONT face="Times New Roman">Location: C:\Program Files\Microsoft Visual Studio </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Are these correct?([y]/n): y</FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Try to update options file: C:\Documents and Settings\kke\Application Data\MathWorks\MATLAB\R14\mexopts.bat </FONT></P>
<P ><FONT face="Times New Roman">From template: E:\MATLAB701\BIN\WIN32\mexopts\msvc60opts.bat </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">Done . . . </FONT></P>
<P ><FONT face="Times New Roman"> </FONT></P>
<P ><FONT face="Times New Roman">>> cd(prefdir)</FONT></P>
<P ><FONT face="Times New Roman">>> mccsavepath</FONT></P>
<P ><FONT face="Times New Roman">??? Undefined function or variable 'mccsavepath'.</FONT></P>
<P ><FONT face="Times New Roman"> <p></p></FONT></P>
<P ><FONT face="Times New Roman">>></FONT></P>
<P ><FONT face="Times New Roman"> <p></p></FONT></P>
<P >这又是为什么呢?请各位帮帮忙,谢谢大家!</P>
>> 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] Lcc C version 2.4 in D:\MATLAB\sys\lcc
[0] None
Compiler: 1
Please verify your choices:
Compiler: Lcc C 2.4
Location: D:\MATLAB\sys\lcc
Are these correct?([y]/n): y
The default options file:
"C:\Documents and Settings\leebib\Application Data\MathWorks\MATLAB\R13\mexopts.bat"
is being updated from D:\MATLAB\BIN\WIN32\mexopts\lccopts.bat...