mex Error: Could not find the compiler "cl" on the DOS path?!!

2 views (last 30 days)
please I need your help! I have downloaded a program written in C, and wish to run it in Matlab. To do this is use the mex to compile it into Matlab. This has worked for me with R20013a. However, I tried to use it today with R2008b and I got the error;
>> mex FiltreShenCastan.c
Error: Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2008B\BIN\MEX.PL: Error: Unable to locate compiler.
??? Error using ==> mex at 213
Unable to complete successfully.
>>
and then when I do mex -setup
% >> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n?
Select a compiler:
[1] Microsoft Visual C++ 2008 Express in C:\Program Files ( (x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 Express
Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
*****************************************************************************
Error: Could not find the 64-bit compiler. This may indicate that the
"X64 Compilers and Tools" or the Microsoft Windows Software
Development Kit (SDK) is not installed. To build 64-bit MEX- files
Microsoft Visual C++ 2008 Express Edition requires that these two
packages are installed properly.
************************************************************************* ****
Trying to update options file: C:\Users\mariem\AppData\Roaming\MathWorks\MATLAB\R2008b\mexopts.bat From template: C:\PROGRA~1\MATLAB\R2008b\bin\win64\mexopts\msvc90freeopts.bat
Done . . .
************************************************************************ Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/support/solutions/data/1-5C27B9.html? solution=1-5C27B9 Building with the -largeArrayDims option enables the new API. ***********************************************************************

Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!