[gdal-dev] compile gdal with hdf4 support

Balint Cristian rezso at rdsor.ro
Thu Jun 12 22:23:19 EDT 2008


> GDapi.c:10873: error: 'MAX_VAR_DIMS' undeclared (first use in this
> function) GDapi.c:10873: error: (Each undeclared identifier is reported
> only once GDapi.c:10873: error: for each function it appears in.)
> GDapi.c:10873: warning: unused variable 'dims'

Hello Otto,

Try run following snipped in your bash shell, make sure
you are in root of gdal source folder:

# bug 189337 c8
# HAVE_NETCDF is not present anymore in hdf
pushd frmts/hdf4
for file in `find . -type f -name "*.*"`
do
  sed -i \
    -e 's|MAX_NC_NAME|H4_MAX_NC_NAME|' \
    -e 's|MAX_VAR_DIMS|H4_MAX_VAR_DIMS|' \
    -e 's|MAX_NC_DIMS|H4_MAX_NC_DIMS|g' \
    -e 's|UNKNOWN|H4_UNKNOWN|g' \
   $file
done
popd

This should fix it.

//cristian


More information about the gdal-dev mailing list