[gdal-dev] compile error on windows
Jeff McKenna
jmckenna at gatewaygeomatics.com
Tue Aug 2 05:06:22 PDT 2016
For the longest time MS4W did leverage the static lib for HDF5, so the
switch of -D_HDF5USEDLL was required in GDAL. If you compile HDF5
dynamically you will require the -DH5_BUILT_AS_DYNAMIC_LIB switch. This
is described at https://www.hdfgroup.org/HDF5/release/obtain5.html
Please please if this is still confusing, take a moment and edit that
GDAL BuildHints page, to make this more understandable for everyone:
https://trac.osgeo.org/gdal/wiki/HDF
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
On 2016-08-01 8:19 PM, twhall wrote:
> I had previously built HDF5 v1.8.17 as a 64-bit DLL on Windows 10, Visual
> Studio 2010.
>
> Today I tried to rebuild GDAL v2.0.2 to include the HDF5 format, but failed
> with the undefined symbols as reported by Ryan Grout on Apr. 29.
>
> I followed his advice from May 02, to edit frmts/hdf5/makefile.vc, replacing
> -D_HDF5USEDLL_ with -DH5_BUILT_AS_DYNAMIC_LIB, and that fixed the immediate
> problem. GDAL built successfully, though it remains to be seen whether the
> HDF5 part actually works.
>
> The dependence on -DH5_BUILT_AS_DYNAMIC_LIB originates in the HDF5 header
> H5api_adpt.h:
> #ifdef H5_BUILT_AS_DYNAMIC_LIB
> ...
> #define H5_DLL __declspec(dllimport)
>
> Without that, the symbols won't import from the DLL.
>
> I don't see any dependence on _HDF5USEDLL_
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-compile-error-on-windows-tp5263583p5279010.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
More information about the gdal-dev
mailing list