--- gdal-2.2.1.orig/frmts/hdf5/makefile.vc	2017-06-23 09:18:42.000000000 -0300
+++ gdal-2.2.1/frmts/hdf5/makefile.vc	2017-07-20 17:39:59.061077854 -0300
@@ -7,7 +7,7 @@
 
 PLUGIN_DLL 	=	gdal_HDF5.dll
 
-EXTRAFLAGS 	= 	-I$(HDF5_DIR)\include -DWIN32 -D_HDF5USEDLL_ 
+EXTRAFLAGS 	= 	-I$(HDF5_DIR)\include -DWIN32 -DH5_BUILT_AS_DYNAMIC_LIB 
 
 !IF "$(HDF5_PLUGIN)" == "YES"
 EXTRAFLAGS = $(EXTRAFLAGS) -DHDF5_PLUGIN
