MATLAB: Problem Starting MEX file

mex compiler intel fortran visual studio setup

Hello,
I'm trying to learn about MEX files for a project where I will have to interface between a fortran code and matlab code.I wanted to start out with the examples for mathworks but can't get past the mex -setup. Please see the following:
>> mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2011b/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[3] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[4] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[5] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[8] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[10] Microsoft Software Development Kit (SDK) 7.1
[11] Microsoft Visual C++ 2005 SP1
[12] Microsoft Visual C++ 2008 SP1
[13] Microsoft Visual C++ 2010
[14] Microsoft Visual C++ 2010 Express
[0] None
Compiler: 9
Warning: The default location for Intel Visual Fortran compiler is:
"C:\Program Files (x86)\Intel\Compiler\11.1\054\"
but either that directory does not exist or the configuration
is invalid.
Use C:\Program Files (x86)\Intel\Compiler\11.1\054\ anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files (x86)\Intel\Compiler\11.1\054\] [C:\Program Files (x86)\Intel\Compiler\11.1\038\]
Please verify your choices:
Compiler: Intel Visual Fortran 11.1
Location: [C:\Program Files (x86)\Intel\Compiler\11.1\038\]
Are these correct [y]/n? y
***************************************************************************
Warning: Support for Intel Visual Fortran 11.1 will be discontinued in a
future release, at which time new versions will be supported.
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/R2011b/win64.html
***************************************************************************
Error: Microsoft Visual Studio 2008 SP1 Professional Edition was
not found by mex -setup.
The Microsoft Visual Studio 2008 SP1 Professional Edition
linker is required to build Intel Fortran MEX-files. Please
make sure that Microsoft Visual Studio 2008 SP1 Professional
Edition is installed properly.
Error using mex (line 206)
Unable to complete successfully.
I have intel fortran 11.1 compiler and mvs 2008shell. Any help so I can successfully link to the write compiler?
Chris

Best Answer

MEX is not able to find the 64-bit Visual C++ 2008 tools. I would recommend:
  1. First confirm that 64-bit Visual Studio 2008 and/or SDK 6.1 tools are installed. This version of Visual Studio may not have installed the 64-bit tools.
  2. Ensure that you can compile a simple 64-bit C program from the Visual Studio IDE and command line (the later using VCVARSALL -- you should have a Start Menu item for this)
  3. Only then try to bring the Intel compiler into the mix
If this sounds too painful, installing .NET 4.0 and then the (free) Microsoft Windows SDK 7.1 should give you the 64-bit tools you need.
Related Question