作者darrenliuptt (Darren)
看板Fortran
标题[问题] Dll以common交换数据
时间Tue Jun 13 17:34:45 2017
想请教版上前辈们
我需要写一个dll档
程式码示意:
FUNCTION TRAP (A, B, N, Y)
IMPLICIT NONE
REAL ( KIND = 8 ) TRAP
REAL ( KIND = 8 ) A, B, Y ( 20 ), ANS
INTEGER N
COMMON / TRA / A , B , N
ANS = A + B + N + Y(1)
TRAP = ANS
RETURN
END FUNCTION
编译结果:
error #6406: Conflicting attributes or multiple declaration of name. [A]
error #6406: Conflicting attributes or multiple declaration of name. [B]
error #6406: Conflicting attributes or multiple declaration of name. [N]
请问问题在哪呢?
谢谢!
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 27.52.193.69
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Fortran/M.1497346487.A.2C1.html
1F:→ blc: 先确认一下,你知道common是什麽意思吗? 06/13 21:24
2F:推 a620699999: 外面要先写再放进来 06/17 16:20
原因应该是dll无法使用COMMON来交换数据
谢谢大家!
※ 编辑: darrenliuptt (27.52.193.69), 12/12/2017 00:22:28