MATLAB: I can not find the fortran compiler

fortranmex compiler

Hey guys, I am trying to work on MEX file..so i am starting with following the MEX_files Guide to learn step by step.
I followed the "Mex -setup" step and I have Intel fortran on my computer ( MIcrosoft visual studio 2008 )
but when I am trying the example given : mex yprimef.f I get the following error:
Error: Could not find the compiler "ifort" on the DOS path.
Use mex -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Unable to locate compiler.
??? Error using ==> mex at 208 Unable to complete successfully.
so can someone tell me what could be my error.
P.s. I chose Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) when I have the list of compiler.
thanks alot
Ghandour

Best Answer

Ghandour,
mex -setup is looking at your system environment variables and your path to find the compiler. With your setup, you need to have the following environment variable: IFORT_COMPILER11 set on your machine, pointing to the top directory of your Intel Fortran compiler.
Related Question