求助fortran源程序连接错误
错误如下:编译的时候:
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)
调用子程序的时候好像实参和形参都没有问题啊,请教问题在哪儿。谢谢! 变量的数据类型应该是有问题的,我想应该是主程序和子程序的数据类型不一致导致的。
建议你仔细检查一下。或者是提供源程序,让网友帮你检查。 实参的数据类型与虚参的数据类型不一致
谢谢
根据回复的指导,我找除问题了,主程序中用了implicit real*8(a-h,0-z),而子程序中没有,我想跟这个有关吧。而变量ntoe在一个地方被我误写成了note。 我也遇到了楼主的问题,根据2楼的解答找出了原因
是主程序与子程序数据类型不一致造成的。
页:
[1]