参考http://yxbwuhee.blog.sohu.com/143577510.html
一、C++动态调用Fortran DLL
(1)创建FORTRAN DLL工程,生成forsubs.dll文件供调用。
! forsubs.f90 ! ! FUNCTIONS/SUBROUTINES exported from FORSUBS.dll: ! FORSUBS - subroutine ! INTEGER*4 FUNCTION Fact (n) !DEC$ ATTRIBUTES DLLEXPORT::Fact INTEGER*4 n [VALUE] INTEGER*4 i, amt amt = 1 DO i = 1, n amt = amt * i END DO Fact = amt write(*,*)"Mixed calls succeed!