有关mbuild的问题
请问在使用mbuild命令时出现如下问题,是怎么回事,如何解决:Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
D:\MATLAB701\BIN\WIN32\MEX.PL: Error: Unable to locate compiler.
??? Error using ==> mbuild
Unable to complete successfully
我使用的是matlab7.0
[ 本帖最后由 cdwxg 于 2006-8-23 15:06 编辑 ] Subject:
Why can't MEX find my MSVC compiler when I try to compile an engine program?
Problem Description
Why can't MEX find my MSVC compiler when I try to compile an engine program?
+ mex -f d:\matlabr11\bin\msvc60engmatopts.bat d:\matlabr11\extern\examples\eng_mat\engdemo.c
Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
D:\MATLABR11\BIN\MEX.BAT: Unable to locate compiler.
Solution:
This problem is caused by an ommision in the MSVC60ENGMATOPTS.BAT file located in $MATLAB\bin, where $MATLAB is the root MATLAB directory.
The line that sets the MSVCDir variable needs to use the DOS path to the MSVC 6.0 directory and include the VC98 directory. You should edit the MSVC60ENGMATOPTS.BAT file to reflect this change.
For example, on one computer, this section:
rem ********************************************************************
rem General parameters
rem ********************************************************************
set MATLAB=%MATLAB%
set MSVCDir=%MSVCDir%
set MSDevDir=%MSVCDir%\..\Common\msdev98
set PATH=%MSVCDir%\BIN;%MSDevDir%\bin;%PATH%
Should read like this:
rem ********************************************************************
rem General parameters
rem ********************************************************************
set MATLAB=%MATLAB%
set MSVCDir=D:\Applications\Micros~2\vc98
set MSDevDir=%MSVCDir%\..\Common\msdev98
set PATH=%MSVCDir%\BIN;%MSDevDir%\bin;%PATH%
把msvc60engmatopts.bat改了以后仍然出错
1、mbuild -setup,选了msvc6.0编译器;2、mcc -m filenames, 出错:
Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
C:\PROGRAM FILES\MATLAB704\BIN\WIN32\\..\WIN32\MEX.PL: Error: Unable to locate compiler.
3、把msvc60engmatopts.bat中的
rem************************
rem General parameters
rem************************
set MATLAB=%MATLAB%
set MSVCDir=%MSVCDir%
set MSDevDir=%MSVCDir%\..\Common\msdev98
set PATH=%MAVCDir%\BIN;%MSDevDir%\bin;%PATH%
改为:
rem************************
rem General parameters
rem************************
set MATLAB=%MATLAB%
set MSVCDir=C:Program files\Micro...\VC98
set MSDevDir=%MSVCDir%\..\Common\msdev98
set PATH=%MAVCDir%\BIN;%MSDevDir%\bin;%PATH%
再mcc还是出错,出错提示跟上面一样,是什么原因阿? 原帖由 arlay 于 2006-11-2 11:34 发表
1、mbuild -setup,选了msvc6.0编译器;
2、mcc -m filenames, 出错:
Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
...
在mathworks上找了一下,相关的结果已经在http://forum.vibunion.com/forum/thread-29598-1-1.html上给出来了 thanks a lot! ^_^
页:
[1]