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

how to export a simple dll for f77 file with intel fortran

smth
Beginner
683 Views
I am a newbie to fortran. I have a program with these parameter

subroutine mgd9v(levels, nxc, nyc, nxf, nyf, nm,
+ iout, istart, iprep, maxit, tol,
+ rhs, a, v, vb, work, ldu, wa, wb, resno, ifail)


integer levels, nxc, nyc, nxf, nyf, nm, iout(6), istart, iprep,
+ maxit, ifail
double precision
+ tol, rhs(nm), a(nm*9), v(nm), vb(nm), work(nxf*12),
+ ldu(nm*3), wa(nm), wb(nm), resno


Can anyone show me how to write the !DEC$ ATTRIBUTES for this specific function?
I want to export it as a dll then invoke it in C++ .

Thanks

0 Kudos
1 Reply
Steven_L_Intel1
Employee
683 Views
!DEC$ ATTRIBUTES DLLEXPORT :: mgd9v

When you write the C++ declaration of this routine, don't forget to use:

extern "C"

or else you'll get C++ name-mangling. In C++ you should call the routine MGD9V (in uppercase).
0 Kudos
Reply