Matlab编译Fortran程序的问题
之前看到过别人问类似的问题,但没有找到有效的解决方法。>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers /n? y
Select a compiler:
Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker) in C:\Program Files\Intel\Compiler\Fortran\9.1
Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2008a\sys\lcc\bin
Microsoft Visual C++ 2005 in C:\Program Files\Microsoft Visual Studio 8
Microsoft Visual C++ .NET 2003 in C:\Program Files\Microsoft Visual Studio .NET 2003
Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio
None
Compiler: 1
Please verify your choices:
Compiler: Intel Visual Fortran 9.1
Location: C:\Program Files\Intel\Compiler\Fortran\9.1
Are these correct /n? y
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.
这里用的Fortran源文件是Matlab R2008a自带的示例文件matdemo1.F。最后生成了一个空的matdemo1.mexw32文件。
请指教。
谢谢! 几十年前曾玩过! 後来懒得用fortran了! 而且新版都没试过了!
sorry! 等用过的专家, 路过吧!
页:
[1]