Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

given a DLL with no LIB

drpierce
Beginner
743 Views
A client gave me a FORTRAN DLL but no LIB. He also specified the name of the DLL entry point. I've never integrated a DLL without including the LIB in my main FORTRAN project.
Thanks!
0 Kudos
3 Replies
james1
Beginner
743 Views
You'll want to use LoadLibrary and GetProcAddress as shown in the LOADEXP1 example that comes with the compiler.

James
0 Kudos
morelf
Beginner
743 Views
Hi,

Sorry for my poor English, I use a machine translation.

You can use the utility "makilib" available on Cd VF6.6 in ' X86USUPPORTMISC' to create a library static, to include at link, containing all definitions exported from your DLL.

Then it is necessary, in each subroutine, to include a declaration of interface. for example (for psapi.dll)

!*
!* ***** PSAPI.LIB Interfaces *****
!*
interface
logical(4) function EnumProcesses( lpidProcess, cb, lpcbNeeded )
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_EnumProcesses' :: EnumProcesses
integer lpidProcess, cb, lpcbNeeded
end function EnumProcesses
end interface

and to use your function as usual.

Have a nice developement.


0 Kudos
Not applicable
743 Views
 
0 Kudos
Reply