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

[netCDF #KMB-390308]: NetCDF 3.6.2 on 64bit Linux with gfortran:

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 #KMB-390308]: NetCDF 3.6.2 on 64bit Linux with gfortran:
  • Date: Sat, 10 May 2008 21:37:29 -0600

Hi Steve,

I think you just need to specify the libraries last on the gfortran invocation,
because
gfortran (and most other compilers when used to link objects and libraries) are
sensitive to the order of arguments.  So instead of:

  gfortran -Wall -I/usr/local/include -L/usr/local/lib -lnetcdf -o ZonalAverage
  ZonalAverage.f90

try

  gfortran -Wall -I/usr/local/include -o ZonalAverage ZonalAverage.f90
  -L/usr/local/lib -lnetcdf

--Russ




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



Ticket Details
===================
Ticket ID: KMB-390308
Department: Support netCDF
Priority: Normal
Status: Closed