[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020207: building netCDF on Linux using g77 with "-DpgiFortran"



Dear Dr Lobo,

Because the Fortran-77 netCDF interface is actually written in C, it
is necessary for the C compiler to know the calling-conventions of
the Fortran-77 compiler. This is done by defining the C macro that
corresponds to the calling conventions used by the Fortran-77 compiler.
Because you used the Fortran-77 compiler "g77", the C macro "f2cFortran"
should have been defined instead of the C macro "pgiFortran".

If you want to use the "g77" compiler, then please try the following:

    1.  Go to the top-level source diretory.

    2.  Perform steps 3 through 5 mentioned near the end of the file
        INSTALL.html.

    3.  Ensure that the environment variable FC is set to the
        (preferably absolute) pathname of the "g77" compiler.

    4.  Ensure that the environment variable CPPFLAGS contains the
        string "-Df2cFortran",  e.g.

            export CPPFLAGS="-Df2cFortran"

        or

            setenv CPPFLAGS "-Df2cFortran"

        depending on your shell. the file INSTALL.html has more
        examples.

    5.  Perform steps 6 through 9 mentioned near the end of the file
        INSTALL.html.

If you want to use a different Fortran-77 compiler, then you need to
adjust steps 3 and 4 above accordingly.  The file INSTALL.html has
examples.

Please let me know if this helps.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>