Public Class Form1
    Inherits System.Windows.Forms.Form
    Private Declare Sub GetFileN Lib "D:\Dll1.dll" (ByVal rr As String, ByVal r As Integer)
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim a As Integer
        Dim File As String
        File = "D:\26.txt"
        Call GetFileN(File, a)
        MsgBox(a)
    End Sub
End Class

 

 

Subroutine GetFileN( iFileUnit ,y)
    !DEC$ ATTRIBUTES STDCALL,DLLEXPORT::GetFileN
    !DEC$ ATTRIBUTES REFERENCE::y
    Implicit None
    Integer y
    Character*50  iFileUnit
    open(10,file=iFileUnit)
      Read(10,  *  ) y
  End subroutine GetFileN

 

fortran的可以运行,怎么连接成动态链接库就提示找不到入口呢?就是打开一个文件读一个数显示出来,很简单的,就是搞不懂为啥找不到入口