[gdal-dev] netcdf option build error

Frank Warmerdam warmerdam at pobox.com
Tue Apr 29 10:32:55 EDT 2008


Jeshua Lacock wrote:
> 
> Greetings,
> 
> I am having difficulty building GDAL 1.5.1 on Mac OS X 10.5.2 with the 
> netcdf format enabled. If I disable the netcdf option, GDAL builds 
> without incident.
> 
> I have netcdf 3.6.2 installed and have specified the installation 
> location with the --with-netcdf flag.
> 
> It seems like it is not parsing netcdf.h.  In GDALmake.opt 
> NETCDF_SETTING is set to 'yes'.
> 
> Any pointers would be greatly appreciated.
> 
> Here are the error messages:
> 
> netcdfdataset.h:151: error: 'NC_MAX_NAME' was not declared in this scope

Jeshua,

I *suspect* you have an HDF4 library built with the netcdf interface.  It
will provide an alternate netcdf.h that lacks defines like NC_MAX_NAME.

The simplest approach may be to find the netcdf.h in the hdf4 install and
remove it.  A more sophisticated approach is to dig into the hdf4 build
and disable the netcdf interface.  There is some discussion about this at:

   http://trac.osgeo.org/gdal/wiki/HDF

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list