我的matlab7.1和fortran6.5,fortran编译器是6.0的。
在matlab工作区输入:mex -setup然后mex readraw.f90(我的fortran文件,包括接口程序和计算程序)出现:
>> 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] Digital Visual Fortran version 6.0 in C:\Program Files\Microsoft Visual Studio
[2] Lcc C version 2.4.1 in D:\PROGRAM FILES\MATLAB71\sys\lcc
[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
Compiler: 1
Please verify your choices:
Compiler: Digital Visual Fortran 6.0
Location: C:\Program Files\Microsoft Visual Studio
Are these correct?([y]/n): y
Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14SP3\mexopts.bat
From template: D:\PROGRAM FILES\MATLAB71\BIN\win32\mexopts\df60opts.bat
Done . . .
Warning! The MathWorks has determined that Digital Fortran 6.0 has several
serious bugs, and highly recommends that you upgrade to the latest version
of Compaq Fortran.
***************************************************************************
Warning: The file extension of 32-bit Windows MEX-files was changed
from ".dll" to ".mexw32" in MATLAB 7.1 (R14SP3). The generated
MEX-file will not be found by MATLAB versions prior to 7.1.
Use the -output option with the ".dll" file extension to
generate a MEX-file that can be called in previous versions.
For more information see:
MATLAB 7.1 Release Notes, New File Extension for MEX-Files on Windows
***************************************************************************
>> mex redaraw.f90
D:\PROGRAM FILES\MATLAB71\BIN\MEX.PL: Error: 'redaraw.f90' not found.
??? Error using ==> mex
Unable to complete successfully