Dear Colleagues
I am a pascal programmer and used to do programming in Unix environment. Now I am in a new place where it has only Linux machine. I would like to call a fortran routine from a main pascal program. I used to do this in Sun machine using the following command
pc -o output pf.p ff.o
where ff.o is made using f77 -c ff.f; out is executable file.
In side my pascal program I defined (declared) the fortran subroutine as follows:
function xx(var ...; var ...) :double; external fortran OR function xx(var ...; var ...) :double; external;
(I believe here is my problem; above lines)
In my current machine I have g77 (fortran equivalent) and gpc. I can get ff.o but when I use on-line commamd : gpc -o output pf.p ff.o.
It gave me problems. There is not enough document in man pages to help me? Your help will be highly appciated?
Best Regards Dr M Ali ----------------------------------------------- Centre for Control Theory and Optimization Department of Computational and Applied Mathematics University of the Witwatersrand Private Bag 3, Wits, 2050, Johannesburg, South Africa Tel: +27 (0)11 7176139 (W), Tel: +27 (0)11 403 0250 (H) Fax: +27 (0)11 403-9317 (W), http://www.cam.wits.ac.za/~mali/ Email : mali@cs.wits.ac.za
Montaz Ali a écrit :
Dear Colleagues
I am a pascal programmer and used to do programming in Unix environment. Now I am in a new place where it has only Linux machine. I would like to call a fortran routine from a main pascal program. I used to do this in Sun machine using the following command
pc -o output pf.p ff.o
where ff.o is made using f77 -c ff.f; out is executable file.
In side my pascal program I defined (declared) the fortran subroutine as follows:
function xx(var ...; var ...) :double; external fortran OR function xx(var ...; var ...) :double; external;
use rather: function xx(var ...; var ...) :double; asmname 'ff';
(pascal and external names may differ, pascal name is case insensitive, external name is case sensitive)
(I believe here is my problem; above lines)
In my current machine I have g77 (fortran equivalent) and gpc. I can get ff.o but when I use on-line commamd : gpc -o output pf.p ff.o.
Should work.