声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2128|回复: 2

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

[复制链接]
发表于 2006-9-8 17:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
安装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 [y]/n? y

Select a compiler:
[1] Compaq Visual Fortran version 6.6 in D:\Program Files\Microsoft Visual Studio
[2] Lcc C version 2.4 in D:\MATLAB6P5\sys\lcc
[3] Microsoft Visual C/C++ version 6.0 in D:\Program Files\Microsoft Visual Studio

[0] None

Compiler: 1

Please verify your choices:

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

Are these correct?([y]/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
回复
分享到:

使用道具 举报

 楼主| 发表于 2006-9-8 17:35 | 显示全部楼层
不知道是不是Matlab的设置问题?
发表于 2006-11-15 12:34 | 显示全部楼层
我也遇到同样的问题,不知怎么办?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-10-3 23:24 , Processed in 0.070767 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表