linuxfortran

How to compile Fortran 77 files in linux?


I need a compiler for Fortran 77 in linux.

Are there any free compilers out there that people use?

I've heard about g77, but I can't find the rpm or how to install it in linux.


Solution

  • GCC's Fortran compiler name has changed: g77 has been replaced by gfortran, which handles Fortran 95 and possibly more recent variants.

    The package in Ubuntu is called gfortran:

    sudo apt-get install gfortran
    

    (or use synaptic)

    The package in Fedora is called gfortran and is part of gcc, which you probably already have:

    sudo yum install gcc
    

    (or use pirut)

    Similar searches should work for your distribution as well.

    Update: On RedHat 4.1.2 the package seems to be called gcc4-gfortran. Incidentally, you ought to be able to search for this with yum, and that may be the best answer to your question:

    yum search "*fortran*"