- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!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).
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).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page