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

20000504: experimental f90 build under Linux using NA FortranPlus



Bruce,

>Date: Thu, 4 May 2000 17:01:26 -0400 (EDT)
>From: root <address@hidden>
>Organization: University of Toronto
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20000504: experimental f90 build under Linux using NA FortranPlus
>Keywords: 200005041756.e44HuUG03132

In the above message, you wrote:

> I kind back to square one.  The variables still can not be seen from
> library files.  (Please see the attached file for detail.)  I tried to
> use the NA f90 to compile and not success.  Therefore, this version of
> netCDF is compiled by g77.  I really appreciate your help and support,
> and, again, thanks for any advise.
...
> f90 -o netcdf_test netcdf_test.f90 netcdf.o typeSizes.o
> -L/usr/local/netcdf-3.5/lib -lnetcdf
> Compiling netcdf_test.f90 ...
> Reading /usr/local/netcdf-3.5/src/f90/netcdf_test.f90
> Program netcdftest:
> New program target "netcdftest" created for program unit
> OK, Successfully compiled netcdf_test.f90
> 
> Composing netcdf_test ...
> Linking netcdf_test ...
> netcdf_test.o: In function `$$C':
> netcdf_test.o(.text+0x6c08): undefined reference to `external$nf_strerror*'
> netcdf_test.o(.text+0x6df8): undefined reference to `nf_create_'
> netcdf_test.o(.text+0x747f): undefined reference to `nf_open_'

The above indicates that your NA FortranPlus compiler doesn't use the
Fortran global-name conventions with which you built the netCDF
library.  The solution is to rebuild the netCDF library, telling the
build process to use the Fortran global-name conventions that NA
FortranPlux uses.

Try the following:

    1.  Go to the top-level, netCDF source directory.

    2.  Perform steps 3 and 4 near the end of the INSTALL file.

    3.  Perform step 5 near the end of the INSTALL file except that you
        should ensure that:
        
        A.  The environment variable CPPFLAGS contains the string
            "-DsunFortran" rather than the string "-Df2cFortran".  This
            will ensure that the global-names of the Fortran routines
            conform to the NA FortranPlus convention.

        B.  The environment variable FC references the NA FortranPlus
            compiler rather than "g77".

    4.  Perform steps 6 though 9 near the end of the install file.

    5.  Try to rebuild the experimental F90 interface using the NA
        FortranPlus compiler.

In general, one should use the same Fortran compiler to build the netCDF
package as any Fortran programs that use the netCDF package.

Please let me know if this helps.

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