声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 5369|回复: 4

[Fortran] 求助fortran源程序连接错误

[复制链接]
发表于 2007-4-26 10:18 | 显示全部楼层 |阅读模式

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

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

x
错误如下:
              编译的时候:
                              Compiling Fortran...
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(162) : Warning: In the call to SUPS, actual argument #4 does not match the type and kind of the corresponding dummy argument.
      CALL SUPS(NWD,NWD1,NF,SKK,SKK1,SMM,SMM1,LSU,JF)                 !调用支撑条件子程序
----------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(162) : Warning: In the call to SUPS, actual argument #5 does not match the type and kind of the corresponding dummy argument.
      CALL SUPS(NWD,NWD1,NF,SKK,SKK1,SMM,SMM1,LSU,JF)                 !调用支撑条件子程序
--------------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(162) : Warning: In the call to SUPS, actual argument #6 does not match the type and kind of the corresponding dummy argument.
      CALL SUPS(NWD,NWD1,NF,SKK,SKK1,SMM,SMM1,LSU,JF)                 !调用支撑条件子程序
-------------------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(162) : Warning: In the call to SUPS, actual argument #7 does not match the type and kind of the corresponding dummy argument.
      CALL SUPS(NWD,NWD1,NF,SKK,SKK1,SMM,SMM1,LSU,JF)                 !调用支撑条件子程序
-----------------------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(166) : Warning: In the call to GJAC, actual argument #1 does not match the type and kind of the corresponding dummy argument.
   CALL GJAC(SKK1,SMM1,U,E,NWD1,NWD1)                              !调用广义雅克比法子程序
--------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(166) : Warning: In the call to GJAC, actual argument #2 does not match the type and kind of the corresponding dummy argument.
   CALL GJAC(SKK1,SMM1,U,E,NWD1,NWD1)                              !调用广义雅克比法子程序
-------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(166) : Warning: In the call to GJAC, actual argument #3 does not match the type and kind of the corresponding dummy argument.
   CALL GJAC(SKK1,SMM1,U,E,NWD1,NWD1)                              !调用广义雅克比法子程序
------------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\1\1.f90(166) : Warning: In the call to GJAC, actual argument #4 does not match the type and kind of the corresponding dummy argument.
   CALL GJAC(SKK1,SMM1,U,E,NWD1,NWD1)                              !调用广义雅克比法子程序
--------------------------------^

1.obj - 0 error(s), 8 warning(s)

连接的时候:
              Linking...
1.obj : error LNK2001: unresolved external symbol _NOTE@8
Debug/1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

1.exe - 2 error(s), 0 warning(s)


调用子程序的时候好像实参和形参都没有问题啊,请教问题在哪儿。谢谢!
回复
分享到:

使用道具 举报

发表于 2007-4-27 19:11 | 显示全部楼层
变量的数据类型应该是有问题的,我想应该是主程序和子程序的数据类型不一致导致的。
建议你仔细检查一下。或者是提供源程序,让网友帮你检查。

评分

1

查看全部评分

发表于 2007-4-27 20:24 | 显示全部楼层
实参的数据类型与虚参的数据类型不一致
 楼主| 发表于 2007-4-28 10:01 | 显示全部楼层

谢谢

根据回复的指导,我找除问题了,主程序中用了implicit real*8(a-h,0-z),
而子程序中没有,我想跟这个有关吧。而变量ntoe在一个地方被我误写成了note。

评分

1

查看全部评分

发表于 2010-3-3 08:29 | 显示全部楼层
我也遇到了楼主的问题,根据2楼的解答找出了原因
是主程序与子程序数据类型不一致造成的。
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-5-11 20:57 , Processed in 0.070770 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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