On Wednesday, September 14, 2022 at 5:14:41 AM UTC-7, Anouar BOUANO wrote:
> I want to compile a fortran77 code and after using the commange :
> fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsacio.a fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsac.a gcc -o mlmcodaq-sn.f -o mlmcodaq-sn.f
> I got the message : gcc: error: fort77: No such file or directory
It looks like what should have been three lines, three commands, was combined into one.
fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsacio.a
fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsac.a
gcc -o mlmcodaq-sn.f -o mlmcodaq-sn.f
That still leaves a few questions:
Is lscodeqan-sn options for the f77 command?
The gcc command doesn't make sense at all, with two -o options ...
The fort77 lines seem to compile the same Fortran programs with different libraries,
but don't specify an output file.
The default is a.out, which will be overwritten by the second one.
Most often, I recommend gfortran, even for older programs. As well as I know,
it does everything that fort77 does.
Last year, I was compiling Fortran programs written for the IBM 1130
with gfortran. Most things work just fine, even old depracated
features. The one problem I remember, is that IBM allows for
apostrophed character data in DATA statements, instead of the
more usual (for the time), Hollerith constants. gfortran only allows the latter.
You will need to recompile and generate new .a files, though,
to use any other compiler.