<div dir="ltr"><div><div><div><div><div>Thanks, again Christoph.  You're a lifesaver.<br><br></div>For the benefit of the gdal-dev list.<br></div>Applying the below patch to GDAL fixed my build issues with HDF5 1.8.16<br>-----------------------------------------------------------------------------<br>diff --git frmts/hdf5/<a href="http://makefile.vc" target="_blank">makefile.vc</a> frmts/hdf5/<a href="http://makefile.vc" target="_blank">makefile.vc</a><br>index e2e695d..02f006f 100644<br>--- frmts/hdf5/<a href="http://makefile.vc" target="_blank">makefile.vc</a><br>+++ frmts/hdf5/<a href="http://makefile.vc" target="_blank">makefile.vc</a><br>@@ -7,7 +7,7 @@ OBJ        =    hdf5dataset.obj  hdf5imagedataset.obj \<br> <br> PLUGIN_DLL     =    gdal_HDF5.dll<br> <br>-EXTRAFLAGS     =     -I$(HDF5_DIR)\include -DWIN32 -D_HDF5USEDLL_ <br>+EXTRAFLAGS     =     -I$(HDF5_DIR)\include -DWIN32 -DH5_BUILT_AS_DYNAMIC_LIB<br> <br> !IF "$(HDF5_PLUGIN)" == "YES"<br> EXTRAFLAGS = $(EXTRAFLAGS) -DHDF5_PLUGIN<br>------------------------------------------------------------------------------<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 4:28 PM, Christoph Gohlke <span dir="ltr"><<a href="mailto:cgohlke@uci.edu" target="_blank">cgohlke@uci.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Check the compile options. To use shared libraries of HDF5-1.8.16 on Windows with Visual Studio you must specify the H5_BUILT_AS_DYNAMIC_LIB compile definition (see <<a href="https://www.hdfgroup.org/HDF5/release/obtain5.html" rel="noreferrer" target="_blank">https://www.hdfgroup.org/HDF5/release/obtain5.html</a>>).<br>
<br>
Christoph<div><div><br>
<br>
<br>
On 4/29/2016 1:17 PM, Ryan Grout wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hello,<br>
<br>
I'm attempting to build GDAL for windows using Visual Studio 2008.<br>
I've included the output of the build failure below.<br>
<br>
I don't see anything wrong with the linking command (hdf5 library is<br>
there).  I've double checked the exported symbols of hdf5.lib and it<br>
definitely exports the symbols that gdal complains it can't find.<br>
<br>
I get this failure on Windows 10 with Visual Studio 2008 and gdal 2.0.0<br>
through 2.1.0 RC4.  I suspect it might have something to do with HDF<br>
1.8.16 (since the problem only manifested itself since updating HDF5).<br>
<br>
<br>
Searching this mailing list, I couldn't find similar failures.  Any help<br>
would be appreciated.<br>
<br>
Thanks,<br>
Ryan<br>
<br>
The compile fails with the following output:<br>
        cd ..<br>
        if exist gdal.lib del gdal.lib<br>
        lib /nologo /out:gdal.lib port\*.obj gcore\*.obj alg\*.obj<br>
frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib gnm\*.obj<br>
gnm\gnm_frmts\o\*.obj   apps\commonutils.obj apps\gdalinfo_lib.obj<br>
apps\gdal_translate_lib.obj apps\gdalwarp_lib.obj apps\ogr2ogr_lib.obj<br>
apps\gdaldem_lib.obj apps\nearblack_lib.obj apps\gdal_grid_lib.obj<br>
apps\gdal_rasterize_lib.obj apps\gdalbuildvrt_lib.obj<br>
ogrsf_frmts.lib(ogrjmllayer.obj) : warning LNK4221: no public symbols<br>
found; archive member will be inaccessible<br>
ogr.lib(ograpispy.obj) : warning LNK4221: no public symbols found;<br>
archive member will be inaccessible<br>
nitf_gcprpc.obj : warning LNK4221: no public symbols found; archive<br>
member will be inaccessible<br>
cpl_recode_iconv.obj : warning LNK4221: no public symbols found; archive<br>
member will be inaccessible<br>
        link /nologo /dll /INCLUDE:OSRValidate<br>
/INCLUDE:OPTGetProjectionMethods  /INCLUDE:OGR_G_GetPointCount<br>
/INCLUDE:OGRRegisterAll /INCLUDE:GDALSimpleImageWarp<br>
/INCLUDE:GDALReprojectImage  /INCLUDE:GDALComputeMedianCutPCT<br>
/INCLUDE:GDALDitherRGB2PCT  /INCLUDE:OCTNewCoordinateTransformation<br>
port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj<br>
ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib gnm\*.obj<br>
gnm\gnm_frmts\o\*.obj   apps\commonutils.obj apps\gdalinfo_lib.obj<br>
apps\gdal_translate_lib.obj apps\gdalwarp_lib.obj apps\ogr2ogr_lib.obj<br>
apps\gdaldem_lib.obj apps\nearblack_lib.obj apps\gdal_grid_lib.obj<br>
apps\gdal_rasterize_lib.obj apps\gdalbuildvrt_lib.obj<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\xerces-c_3.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\hdf.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\mfhdf.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\xdr.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\netcdf.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\geos_c.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\hdf5.lib<br>
C:\Users\builder\Miniconda2\envs\_build\Library\lib\libkea.lib<br>
odbc32.lib odbccp32.lib user32.lib                        ws2_32.lib<br>
gcore\Version.res  /out:gdal201.dll /implib:gdal_i.lib<br>
   Creating library gdal_i.lib and object gdal_i.exp<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_DOUBLE_g referenced in function "bool __cdecl<br>
GH5_FetchAttribute(int,char const *,double &,bool)"<br>
(?GH5_FetchAttribute@@YA_NHPEBDAEAN_N@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_DOUBLE_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_FLOAT_g referenced in function "bool __cdecl<br>
GH5_FetchAttribute(int,char const *,double &,bool)"<br>
(?GH5_FetchAttribute@@YA_NHPEBDAEAN_N@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_FLOAT_g<br>
hdf5imagedataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_FLOAT_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_INT_g referenced in function "bool __cdecl<br>
GH5_FetchAttribute(int,char const *,double &,bool)"<br>
(?GH5_FetchAttribute@@YA_NHPEBDAEAN_N@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol H5T_NATIVE_INT_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_ULLONG_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_ULLONG_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_LLONG_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_LLONG_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_ULONG_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_ULONG_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_LONG_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_LONG_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_UINT_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_UINT_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_USHORT_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_USHORT_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_SHORT_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_SHORT_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_UCHAR_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_UCHAR_g<br>
gh5_convenience.obj : error LNK2019: unresolved external symbol<br>
H5T_NATIVE_SCHAR_g referenced in function "enum GDALDataType __cdecl<br>
GH5_GetDataType(int)" (?GH5_GetDataType@@YA?AW4GDALDataType@@H@Z)<br>
hdf5dataset.obj : error LNK2001: unresolved external symbol<br>
H5T_NATIVE_SCHAR_g<br>
gdal201.dll : fatal error LNK1120: 12 unresolved externals<br>
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual<br>
Studio 9.0\VC\BIN\amd64\link.EXE"' : return code '0x460'<br>
Stop.<br>
<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
</blockquote>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div><br></div></div>