[gdal-dev] compile error on windows

Even Rouault even.rouault at spatialys.com
Tue May 3 00:54:58 PDT 2016


Le lundi 02 mai 2016 23:21:04, Ryan Grout a écrit :
> Thanks, again Christoph.  You're a lifesaver.
> 
> For the benefit of the gdal-dev list.
> Applying the below patch to GDAL fixed my build issues with HDF5 1.8.16
> ---------------------------------------------------------------------------
> -- diff --git frmts/hdf5/makefile.vc frmts/hdf5/makefile.vc
> index e2e695d..02f006f 100644
> --- frmts/hdf5/makefile.vc
> +++ frmts/hdf5/makefile.vc
> @@ -7,7 +7,7 @@ OBJ        =    hdf5dataset.obj  hdf5imagedataset.obj \
> 
>  PLUGIN_DLL     =    gdal_HDF5.dll
> 
> -EXTRAFLAGS     =     -I$(HDF5_DIR)\include -DWIN32 -D_HDF5USEDLL_
> +EXTRAFLAGS     =     -I$(HDF5_DIR)\include -DWIN32
> -DH5_BUILT_AS_DYNAMIC_LIB

Jeff,

does the above match your experience ? We could probably define both 
_HDF5USEDLL_ and H5_BUILT_AS_DYNAMIC_LIB to address different versions.

I see in https://www.hdfgroup.org/windows/faq.html that _HDF5USEDLL_ is still 
advised.

Ryan,

could you try with both  -D_HDF5USEDLL_ and  -DH5_BUILT_AS_DYNAMIC_LIB defined 
? (make sure to clean the frmts/hdf5 directory before rebuilding)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list