[gdal-dev] Definition conflict in HDF4 driver?

Kor de Jong k.dejong at geo.uu.nl
Tue Oct 28 09:34:19 EDT 2008


Hi Sjur,

On Tuesday 28 October 2008 13:26:45 Kolberg Sjur A wrote:
> I seem to get a conflict between the GDAL file hdf4dataset.h and the HDF4
> file mfhdfi.h concerning 'UNKNOWN' as an enum definition: 1>c:\program
> files\gdal-1.5.3\frmts\hdf4\hdf4dataset.h(55) : error C2365: 'UNKNOWN' :
> redefinition; previous definition was 'enumerator' 1> c:\program
> files\hdf42r3\include\mfhdfi.h(26) : see declaration of 'UNKNOWN'

I recognize the message and fixed it like this (as per some tip I found
some time ago while Googling on the error message):

sed -i "s! UNKNOWN! UNKNOWNPRODUCT!" frmts/hdf4/*.{h,cpp}
sed -i "s!\"UNKNOWN!\"UNKNOWNPRODUCT!" frmts/hdf4/*.{h,cpp}

(Replace UNKNOWN by UNKNOWNPRODUCT in the relevant files to prevent
the conflict. Note the space and double quote in front of the words.)

Other than that I was able to build Gdal with hdf4.2r3 support.

Kor


More information about the gdal-dev mailing list