Sie sind auf Seite 1von 15

Fortran DLL with Visual Studio

Creating a Fortran DLL in Visual Studio with Intel Visual Compiler

By Sukhbinder Singh

File > New Project

3 4

Add an Existing Fortran routine.

Adde d

Only thing to modify in Fortran program

Add these two lines

SUBROUTINE SIMPSON (N,H,FI,S) !DEC$ ATTRIBUTES DLLEXPORT, DECORATE, ALIAS : "SIMPSON" :: SIMPSON This statement declares the subroutine, that will be called by the program using dll

!DEC$ ATTRIBUTES REFERENCE :: FI,H,S,N This statement declares the variables

Thats it. Build the program

Done. Go check the project folder.

Viola!!!! There it is

Thank You
Hope this helps!!

Das könnte Ihnen auch gefallen