diff -urN gdal-2.3.1.orig/frmts/hdf5/makefile.vc gdal-2.3.1/frmts/hdf5/makefile.vc
--- gdal-2.3.1.orig/frmts/hdf5/makefile.vc	2018-08-12 06:43:11.595985800 -0500
+++ gdal-2.3.1/frmts/hdf5/makefile.vc	2018-08-12 06:46:22.640312800 -0500
@@ -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
