I am trying to integrate to an existing Fortran code mycode.F
a mwPointer. My mycode.F
compiled correctly before any change I tried to make. Here's an extract:
subroutine mycode(t1,t2,action,p1,p2,Q,flag)
implicit none
integer IZERO, IUN, IDEUX, ITROIS
double precision DZERO,DUN,DDEUX,DTROIS,flag
parameter (IUN=1,IZERO=0,IDEUX=2,ITROIS=3,DZERO=0.0d0,DUN=0.1D1,DDEUX=0.2D1,DTROIS=0.3D1)
double precision action, t1, t2, p1, p2, Q
double precision Q2(10),D(10),time(10),G1(10),G(10,2),F(51)
integer i
print *, 'Lorem'
end
In order to use the engOpen function and following this Mathworks page, I modified my code to this:
#include "fintrf.h"
#include "engine.h"
subroutine mycode(t1,t2,action,p1,p2,Q,flag,engOpen)
implicit none
integer IZERO, IUN, IDEUX, ITROIS
double precision DZERO,DUN,DDEUX,DTROIS,flag
parameter (IUN=1,IZERO=0,IDEUX=2,ITROIS=3,DZERO=0.0d0,DUN=0.1D1,DDEUX=0.2D1,DTROIS=0.3D1)
double precision action, t1, t2, p1, p2, Q
double precision Q2(10),D(10),time(10),G1(10),G(10,2),F(51)!
integer i
mwPointer engOpen
print *, 'Lorem'
end
But when I compile, I get the following error:
mwPointer engOpen
1
Error: Unclassifiable statement at (1)
Error: Symbol 'engopen' at (1) has no IMPLICIT type
Would anyone know how to solve this?
Thanks for your help