Software Archive
Read-only legacy content
17061 토론

WithinFortran DLL, Importing other DLL.

Intel_C_Intel
직원
290 조회수
There is two Fortran DLL(Dynamic link library). Two Fortran DLL have each other one subroutine statement. Is One DLL able to import the other DLL?
0 포인트
1 응답
Intel_C_Intel
직원
290 조회수
! A.f90 in dll project A 
subroutine foo() 
  !dec$ attributes dllexport :: foo 
  ! ... 
end subroutine foo
 
 

! B.f90 in dll project B - in the IDE make project A a dependency of B

subroutine bar() 
  !dec$ attributes dllexport :: bar 
  interface 
    subroutine foo() 
      !dec$ attributes dllimport :: foo 
    end subroutine foo 
  end interface 
  ! ... 
  call foo() 
  ! ... 
end subroutine bar 

I think that'd do it. Further reading in the Programmer's Guide is recommended.

-John

0 포인트
응답