[gdal-dev] compile error on windows

twhall twhall at umich.edu
Mon Aug 1 16:19:17 PDT 2016


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.


More information about the gdal-dev mailing list