I am trying to compile a program written in FORTRAN that plots graphs using the DISLIN libraries, but all data is in double precision. I cannot lose this precision, so passing everything to simple precision is not an option. When I attempt to link to the double precision libraries (_d), I still get the following error I would expect had I linked to simple precision libraries:
call graf(-1.D0, 1.D0, -1.D0, 2.D0/10.D0, -1.D0, 1.D0, -1.D0, 2.D0/10.)
(1)
ERROR: Type mismatch in argument 'ax' at (1); passed from REAL(8) to REAL(4).
I also get other such errors in all plotting statements. My compiling command is (gfortran):
gfortran modulename.f95 progname.f95 C:\dislin\disgf_d.a -luser32 -lgdi32 -lopengl32
Note that disgf_d refers to the double precision libraries. Does anyone have any ideas here?
Relevant code:
call metafl("XWIN")
call disini()
call graf(-1.D0, 1.D0, -1.D0, 2.D0/10.D0, -1.D0, 1.D0, -1.D0, 2.D0/10.D0)
do i = 0, m
Z(i) = -1.D0 + (2.D0*i) / m
Y_Z(i) = Int_g(Z(i))
end do
call curve (Z, Y_Z, m + 1)
do i = 0, m
Y_Z(i) = g(Z(i))
end do
call curve (Z, Y_Z, m + 1)
call endgrf()
call disfin()
-ldislin_das the link option for the double precision dislin libraries. - M. S. B.