标题: error #6631: A non-optional actual argument must be present when invoking a ... [打印本页] 作者: chddzgc 时间: 2023-1-16 20:56 标题: error #6631: A non-optional actual argument must be present when invoking a ... 主程序中CALL emb_2d_bc_4node(nx1,nx2,ny1,ny2,locatbg,nf)
子程序做成用了静态库
SUBROUTINE emb_2d_bc_4node(nx1,nx2,ny1,ny2,locatbg,nf)
IMPLICIT NONE
INTEGER,INTENT(IN)::nx1,nx2,ny1,ny2,locatbg(:,:)
INTEGER,INTENT(OUT)::nf(:,:)
INTEGER::nm,ic,i,j,nye,i1,i2,i3,m,n,p,it
报错如下
error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [NN]
error #7978: Required interface for passing assumed shape array is missing from original source. [LOCATBG]
error #7978: Required interface for passing assumed shape array is missing from original source. [NF]作者: 楚香饭 时间: 2023-1-16 21:23 本帖最后由 楚香饭 于 2023-1-16 21:24 编辑
感谢,感谢。制成了静态库不知为什么调用不了,单独use了一下可以了。但是error 6631还是有作者: 楚香饭 时间: 2023-1-17 07:58
error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [NN]
这说明时 NN 参数有问题(缺少NN虚参对应的实参),但是你给出的代码片段里并没有 NN,找找是不是别的代码段的问题?