WordPress informs me Creating fortran DLL in microsoft visual studio with intel fortran compiler is my top post of 2011!!
This is one post I did just to let people know how to use visual studio to get fortran DLL and use it in excel.
I thought I should revisit that topic again.
I believe many won’t and don’t use visual studio. They just want to use intel fortran compiler to create their fortran dll’s.
So here’s a non GUI way that show how to create fortran dll’s via the command line using intel compiler.
I will be using this make batch file to create a dll from a fortran program.
No visual studio. Just the intel compiler is enough.
The make batch file automates the following steps.
Compile
ifort /nologo /iface:stdcall /libs:dll /threads /c filename.f
Link
link /NOLOGO /SUBSYSTEM:WINDOWS /manifest /dll /out:filename.dll filename.obj
Generate manifest
mt /nologo “/outputresource:filename.dll;#2″ /manifest filename.dll.manifest
Here’s the zip file containing the example of that fortran dll and the excel file using it.
Enjoy. Any queries or suggestion, drop in your comments.

Leave a comment