用FPS4.0编写生成一个DLL文件“test.dll”(源代码如下)供编写的一个程序调用(源代码如下)。但运行总是出现<无法在DLL“XXXXX\test.dll”中找到名为‘XXX’的入口点>的错误。请高手帮忙啊!
FORTRAN程序:
SUBROUTINE calltest(X,Y,result)
! MS$ ATTRIBUTES ALIAS:"calltest"::calltest
! MS$ ATTRIBUTES DLLEXPORT::calltest
Integer*2 X
Real*4 Y,result
result=X*Y
END SUBROUTINE
程序:
Public Class CallFortran
Declare Sub calltest Lib "test.dll" _
(ByVal vbx As Integer, ByVal vby As Single, ByRef vbresult As Single)
-------------------------------------------------------------------
Private Sub btnjisuan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnjisuan.Click
Dim vbx As Single
Dim vbresult As Single
Dim vby As Integer
vbx = 4
vby = 5
Call calltest(vbx, vby, vbresult)
lbljieguo.Text = vbresult
End Sub
End Class