[gdal-dev] compile error on windows

Jeff McKenna jmckenna at gatewaygeomatics.com
Sat Apr 30 10:15:07 PDT 2016


On 2016-04-29 5:17 PM, Ryan Grout wrote:
> Hello,
>
> I'm attempting to build GDAL for windows using Visual Studio 2008.
> I've included the output of the build failure below.
>
> I don't see anything wrong with the linking command (hdf5 library is
> there).  I've double checked the exported symbols of hdf5.lib and it
> definitely exports the symbols that gdal complains it can't find.
>
> I get this failure on Windows 10 with Visual Studio 2008 and gdal 2.0.0
> through 2.1.0 RC4.  I suspect it might have something to do with HDF
> 1.8.16 (since the problem only manifested itself since updating HDF5).
>
>
> Searching this mailing list, I couldn't find similar failures.  Any help
> would be appreciated.

Compiling HDF5, HDF4, and NetCDF and making them work with GDAL on 
Windows is quite a dance.  Be ready to lose hair and what hair you'll 
have will turn grey.  Then once you think you're in the clear, you try 
compiling it all on x64 and well, a whole new ballgame of errors.

I know I've ran into problems compiling this in years past for the MS4W 
community (http://ms4w.com); there are just so many items to be aware 
of.  Over the years I've tried to record my notes at:

   https://trac.osgeo.org/gdal/wiki/HDF

It would be great if you too could record your notes and 'gotchyas' 
there.  Anything is a help.

I'm working on a new build for the MS4W community with the new 2015 
compiler, which seems to work better managing these 4 libraries (huge 
knock on wood!).

In terms of building HDF5, one of the important notes is during cmake be 
sure to set "-DBUILD_SHARED_LIBS:BOOL:ON"  I'm not sure if that helps 
you case or not.

All this to say, you're not alone in this battle! :)

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/







More information about the gdal-dev mailing list