Opened 16 years ago
Closed 16 years ago
#2296 closed defect (fixed)
hdf4dataset.h:54: error: conflicting declaration 'UNKNOWN'
Reported by: | vincentschut | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: | dron |
Description
New linux flavour, new issues... While building gdal (from svn, combined with a home-brewn hdf4) I came accross the following problem:
libtool: compile: g++ -g -O2 -Wall -I/usr/local/src/tmp/gdal/port -I/usr/local/src/tmp/gdal/gcore -I/usr/local/src/tmp/gdal/alg -I/usr/local/src/tmp/gdal/ogr -I/usr/local/src/tmp/gdal/ogr/ogrsf_frmts -I/usr/local/src/tmp/gdal/ogr -Ihdf-eos -DOGR_ENABLED -I/usr/local/src/tmp/gdal/port -c hdf4dataset.cpp -fPIC -DPIC -o ../o/.libs/hdf4dataset.o In file included from hdf4dataset.cpp:39: hdf4dataset.h:54: error: conflicting declaration 'UNKNOWN' /usr/include/mfhdfi.h:25: error: 'UNKNOWN' has a previous declaration as 'hdf_vartype_t UNKNOWN' hdf4dataset.cpp: In static member function 'static GDALDataset* HDF4Dataset::Open(GDALOpenInfo*)': hdf4dataset.cpp:743: error: cannot convert 'hdf_vartype_t' to 'HDF4SubdatasetType' in assignment make[2]: * o/hdf4dataset.o Error 1
Which can be solved by changing the 'UNKNOWN' in the gdal enum (and references thereof) to some other name, like 'UNKNOWNPRODUCT'.
Attached is a patch that does the above, which fixes the issue for me.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | gdal-hdf4-UNKNOWN.diff added |
---|
comment:1 by , 16 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
That should be now fixed in trunk with r14096. I did it a bit different than suggested by adding H4ST prefix to members of HDF4SubdatasetType enumeration.
Best regards, Andrey