write, open and read statement in fortran dll causing program hang

41 views
Skip to first unread message

Raavi M. Mohindar Rao

unread,
Feb 11, 2016, 5:04:10 PM2/11/16
to GNU Fortran
Hello,

I have used write(*,*), open and read statements in one of my fortran dll and compile

gfortran -c *.f90

and

gfortran -shared *.dll

and when importing the above dll in C# and calling a routine causing program to hang for ever.

May I know how else I can compile to avoid the problem?

jon

unread,
Jul 20, 2018, 6:41:46 PM7/20/18
to GNU Fortran
No error trapping? You really should put some in the Fortran code; that might shine some light. Use in OPEN, CLOSE, READ, WRITE, and such.

example:
 OPEN (UNIT=1, FILE=FILNM, STATUS='OLD', IOSTAT=IERR, ERR=100)

Reply all
Reply to author
Forward
0 new messages