felkin
Chemical
- Feb 5, 2004
- 4
Hi,
I am having trouble getting Excel 2002 VBA to call a dll complied with MinGW Fortran complier. Any help on this particular problem and/or general places to go for help on this matter would be much appreciated.
Here is the Fortran Code I used:
============================================
subroutine DAE(xx,yy)
!DEC$ ATTRIBUTES DLLEXPORT:AE
!DEC ATTRIBUTES ALIAS"'DAE':AE
xx=yy+2005
end
===========================================
Complied with the following commands:
g77 -O2 -c HELL.f
dllwrap --export-all-symbols HELL.o -o HELL.dll
Here is the VBA code that I used:
=======================================
Public Declare Sub DAE Lib "C:\Fortran\hell.dll" (xx As Single, yy As Single)
Option Explicit
Sub CellToApplication()
Dim xx, yy As Single
xx = 31
yy = 13
Call DAE(xx, yy)
Range("B5").Value = xx
End Sub
=================================
The error I get is:
Can't find the DLL entry point DAE in C:\Fortran\hell.dll
Thank you,
Rob
I am having trouble getting Excel 2002 VBA to call a dll complied with MinGW Fortran complier. Any help on this particular problem and/or general places to go for help on this matter would be much appreciated.
Here is the Fortran Code I used:
============================================
subroutine DAE(xx,yy)
!DEC$ ATTRIBUTES DLLEXPORT:AE
!DEC ATTRIBUTES ALIAS"'DAE':AE
xx=yy+2005
end
===========================================
Complied with the following commands:
g77 -O2 -c HELL.f
dllwrap --export-all-symbols HELL.o -o HELL.dll
Here is the VBA code that I used:
=======================================
Public Declare Sub DAE Lib "C:\Fortran\hell.dll" (xx As Single, yy As Single)
Option Explicit
Sub CellToApplication()
Dim xx, yy As Single
xx = 31
yy = 13
Call DAE(xx, yy)
Range("B5").Value = xx
End Sub
=================================
The error I get is:
Can't find the DLL entry point DAE in C:\Fortran\hell.dll
Thank you,
Rob