[netcdfgroup] NetCDF on OS X
Ian Harris
i.harris at uea.ac.uk
Tue Nov 6 10:28:08 MST 2007
Hi Russ,
Nope, I've tried explicitly adding the path in the file, and putting
the directory on the compile line - makes no difference.
Now trying Roy's second suggestion..
Cheers
Harry
On 6 Nov 2007, at 16:51, Russ Rew wrote:
> 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
>
>
>
Ian "Harry" Harris
Climatic Research Unit
School of Environmental Sciences
University of East Anglia
Norwich NR4 7TJ
United Kingdom
More information about the netcdfgroup
mailing list