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

[netCDF #QVM-188363]: make check with netcdf fortran

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDF #QVM-188363]: make check with netcdf fortran
  • Date: Thu, 19 Mar 2015 08:27:29 -0600

Hi Steve,

> Full Name: steve kirby
> Organization: arl
> Package Version: 4.4.2 (Fortran)
> Operating System: Linux
> Hardware:
> Description of problem: Hi,
> 
> First I compiled netcdf-c-4.3.3.1 aok.
> 
> Next, I compiled netcdf-4.4.2 (fortran) using 
> CPPFLAGS=-I/home/skirby/NETCDF4331/include for the configure.  "make" 
> reported no errors. But "make check" is spitting out things like:
> ../fortran/.libs/libnetcdff.so: undefined reference to `nc_put_vara_short'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nc_get_vara_short'
> etc.
> 
> Any suggestions?

In addition to CPPFLAGS, you also need LDFLAGS set to point to the location
of the installed netCDF C library, for example 
LDFLAGS=-Lhome/skirby/NETCDF4331/lib for the configure script. Also, under
some conditions you need to set LD_LIBRARY_PATH to specify the lib directory.
For details, see the netCDF Fortran installation document:

  http://www.unidata.ucar.edu/netcdf/docs/building_netcdf_fortran.html

--Russ

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



Ticket Details
===================
Ticket ID: QVM-188363
Department: Support netCDF
Priority: Normal
Status: Closed