Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [netcdfgroup] NetCDF on OS X

Harry,

> [lea:Working/programs/netcdf_sandbox] ianharri% f77 -o simple_xy_wr  
> simple_xy_wr.f
> /usr/bin/ld: Undefined symbols:
> _nf_close__
> _nf_create__
> _nf_def_dim__
> _nf_def_var__
> _nf_enddef__
> _nf_put_var_int__
> _nf_strerror__
> collect2: ld returned 1 exit status

I think the problem is you aren't telling f77 (or whatever Fortran
compiler you are using) where to find the netCDF include files or
libraries.  For example, if they are installed by fink in /sw/include
and /sw/lib, you have to specify that on the command line, such as:

  f77 -o simple_xy_wr -I/sw/include simple_xy_wr.f -L/sw/lib -lnetcdf

or it they're installed in /usr/local/include and /usr/local/lib, then
you need to use something like:

  f77 -o simple_xy_wr -I/usr/local/include simple_xy_wr.f -L/usr/local/lib 
-lnetcdf

Where the include files and libraries get installed depends on what was
specified using --prefix=WHEREVER on the command line of the configure
script if you are building from source.  The default with version 3.6.2
is /usr/local/.  I think the default with fink is /sw.

We know netCDF 3.6.2 works fine "out of the box" for Mac OS X 10.4.  The
output from the configure script, and the "make check install" step is
here:

  
http://www.unidata.ucar.edu/software/netcdf/builds/3_6_2/sid_Darwin_netcdf-3.6.2_2007-03-05-10-44.txt

--Russ





 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690