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%
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%
原帖由 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.
...