wahaha_2002 发表于 2006-9-8 17:30

安装Compaq Visual Fortran 6.6,Matlab的mex指令不能正常编译fortran文件.

安装Compaq Visual Fortran 6.6,Matlab的mex指令不能正常编译fortran文件.

在这里,先设置 mex环境,选1(Compaq Visual Fortran 6.6)。
然后mex yprimef.f包错。yprimef.f是Matlab 6.5自带的mex例程。

请教各位是为什么?

注:mex本身应该没有问题,如果mex -setup,可以正常编译C语言的程序。

>> 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:
Compaq Visual Fortran version 6.6 in D:\Program Files\Microsoft Visual Studio
Lcc C version 2.4 in D:\MATLAB6P5\sys\lcc
Microsoft Visual C/C++ version 6.0 in D:\Program Files\Microsoft Visual Studio

None

Compiler: 1

Please verify your choices:

Compiler: Compaq Visual Fortran 6.6
Location: D:\Program Files\Microsoft Visual Studio

Are these correct?(/n): y

The default options file:
"C:\Documents and Settings\ljian\Application Data\MathWorks\MATLAB\R13\mexopts.bat"
is being updated from D:\MATLAB6P5\BIN\WIN32\mexopts\df66opts.bat...

>> mex -g yprimef.f
   Creating library _lib3128.lib and object _lib3128.exp
_lib3128.exp : error LNK2001: unresolved external symbol _MEXFUNCTION@16
yprimef.dll : fatal error LNK1120: 1 unresolved externals

D:\MATLAB6P5\BIN\WIN32\MEX.PL: Error: Link of 'yprimef.dll' failed.

??? Error using ==> mex
Unable to complete successfully

wahaha_2002 发表于 2006-9-8 17:35

不知道是不是Matlab的设置问题?

wolong 发表于 2006-11-15 12:34

我也遇到同样的问题,不知怎么办?
页: [1]
查看完整版本: 安装Compaq Visual Fortran 6.6,Matlab的mex指令不能正常编译fortran文件.