A while ago, I wrote an article about HDF Group's Hierarchical Data Format (HDF5) Library . In the article, there were some brief installation instructions. This article adds some refinements to the installation instructions.
You need to start by downloading the compression libraries:
Create a sub-directory called 'compress' somewhere. In that sub-directory, create two additional sub-directories:
'include' and 'lib'.
Unzip the two downloads. From each of the two uncompressed libraries, put all the .lib and .dll files into the
sub-directory .\compress\lib, and put all the .h files into the .\compress\include sub-directory.
In Windows, create two environment variables by going: Start->ControlPanel->System->Advanced->EnvironmentVariables,
and then create two new user variables:
- HDF5_EXT_SZIP = szlibdll.lib
- HDF5_EXT_ZLIB = zlib1.lib
The remaining build instructions focus on building the useful HDF5 C++ libraries for HDF5 v1.9, with v1.9.43
being the latest as of this writing. Download
/hdf5-1.9.43.tar.gz and expand it with
7-Zip into a working sub-directory called
hdf5-1.9.43. Run .\hdf5-1.9.43\windows\copy_hdf.bat. Double click on
.\hdf5-1.9.43\windows\proj\all\all.sln to open the Visual Studio Solution. The file is in version 2005. VS 2008
will ask to convert it for you. You'll need to do so.
After the conversion, go into Tools->Options->ProjectsAndSolutions->VC++Directories.
Set 'Include Files' to the full path of your .\compress\include sub-directory, and set
'Library Files' to the full path of your .\compress\lib sub-directory.
For the project properties, choose whether you are doing a debug build or a release build. Do the build.
For v1.9.43, I found that there was one debug executable that wouldn't build, which, since I'm only interested in
some key libraries, has no effect on my required outcome.
After the build process is complete, open a command prompt in .\hdf5-1.9.43, and run 'installhdf5lib.bat'. The various
.dll, .lib, and .h files will be in \dll, \lib, and \include off of .\hdf5-1.9.43\hdf5lib.
From Sysinternals, download
junction.exe. This
allows you to create symbolic links between directories. Put the program somewhere in your path. Then use it
to create a symbolic link from your existing project to the hdf5lib directory. This will allow you
to change library versions with a simple symbolic link change. For example, something like the following
will set a link to the include files where ever you installed and built the hdf5 libraries.
- junction hdf5 .\hdf5-1.9.43\hdf5lib