>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker) in C:\Program Files\Intel\Compiler\Fortran\9.1
[2] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2008a\sys\lcc\bin
[3] Microsoft Visual C++ 2005 in C:\Program Files\Microsoft Visual Studio 8
[4] Microsoft Visual C++ .NET 2003 in C:\Program Files\Microsoft Visual Studio .NET 2003
[5] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2008a\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2008a\bin\win32\mexopts\intelf91msvs2005opts.bat
Done . . .
>> mex matdemo1.f
LINK : error LNK2001: unresolved external symbol MEXFUNCTION
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mex_mWJdrC\templib.lib : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2008A\BIN\MEX.PL: Error: Link of 'matdemo1.mexw32' failed.
??? Error using ==> mex at 207
Unable to complete successfully.