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

[netCDF #IBB-706211]: netcdf-4.1.3 build question for V2 fortran support

Hi Leon,

> I'm trying to build netcdf-4.1.3 with support for V2 fortran calls like
> ncclos.  I don't see the calls in the netcdf.inc and I get an error when
> linking to the library regarding undefined references.  What flags do I
> need to build with? Right now I'm using  -disable-f90  --disable-netcdf-4

The version-2 Fortran calls are supported in netCDF-4.1.3 by the file 
fortran/fort-v2compat.c in the source, and the API is tested when 
"make check" is run in the nf_test/ directory by invoking the programs 
tst_f77_v2 and ftst_v2.  If successful, these produce the output:

    *** Testing netCDF v2 api for F77.
    *** SUCCESS!
   PASS: tst_f77_v2


    *** Testing v2 fortran API with netCDF-4.
    *** SUCCESS!
  PASS: ftst_v2

If the configure script found a Fortran compiler that could compile Fortran-77 
or if you specified a Fortran-77 compiler to configure with the F77 
environment variable, these should have been compiled and run, and
"make install" should have included the API in the installed libnetcdff library.

Note that with version 4.1.3, the Fortran library was distinct from the C
library on which it depended, so you would have needed to link with both
   -lnetcdff -lnetcdf
flags after the -L flag that specified the library directory.

Also, there's no problem compiling and installing both F77 and F90 libraries,
and both the version 2 and version 3 F77 libraries should be included in the
Fortran library, so there's no need for a --disable-f90 configure option.

The v2 F77 API wouldn't be compiled for any of the following reasons related
to running the configure script:

  - You set the environment variable F77="" to indicate not to use an F77 
  - You specified --disable-f77 or --disable-fortran to say no Fortran API
     was desired
  - You specified --disable-v2

If you still find you don't have the F77-V2 APIs in the libnetcdff library, 
send us the output requested here, so we can try to diagnose the problem:





Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: IBB-706211
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.