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.
Hi Laura, > I am trying to compile the netcdf library (netcdf.3.6.3) on my MacBook > Pro which runs Snow Leopard (10.6.8). > > cloudbug-2:include LAURA$ uname -a > > Darwin cloudbug-2.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 > 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 > > I set: > FC=g95 > CC=gcc > F90=g95 > F77=g95 > > FCFLAGS=-m32 > CXXFLAGS=-m32 > CFLAGS=-m32 > > but I am unable to create netcdf.inc in my include directory. I tried > configure with and then without --enable-f90, but this did not change > anything. Besides netcdf.inc missing, I believe that the install worked > well. I am attaching my config.log file too. > > Can you please give a hint on how to compile the library so that I get > a netcdf.inc file. Thanks. What g95 are you using? It doesn't come with Snow Leopard, so you must have installed a version from somewhere else, so we can't duplicate the problem here. Users report success with g95 and the Apple cc compiler, or gfortran from http://R.research.att.com/tools/. Another possibility would be to try using netCDF-4.1.3, configuring with --disable-netcdf-4 to get just the netCDF-3 library. Also, F90 programs shouldn't try to include netcdf.inc, they just need a "use netcdf" statement, as in the F90 examples here: http://www.unidata.ucar.edu/netcdf/examples/programs/index.html --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: IBH-443553 Department: Support netCDF Priority: High Status: Closed