HDF5 Build and Install Instructions for Windows XP (Full Version)


Notes:

The following instructions assume that the HDF5 source code package from HDF website (http://hdf.ncsa.uiuc.edu) is used.

Table of Contents:

Preconditions

Section I   

  What do we build and install

Section II  

  How to build and test HDF5 libraries and tools

Section III 

  How to Build Examples (Optional)

Section IV 

  How to build an application using the HDF5 library or DLL

Section V  

  How to disable Gzip(Zlib)/Szip compression

Section VI 

  How to build HDF5 in VS 7.0(.NET)

Section VII

  How to build HDF5 with INTEL Compiler

Section VIII

  How to build Multi-threaded version of HDF5 library

Section IX 

  How to build and test HDF5 snapshot release

Section X  

 How to build HDF5 with Thread-Safe Feature

Section XI  

  Misc.


Preconditions


Please read CAREFULLY about the following preconditions and notes first.

1. Installed Microsoft Visual C++ 6.0 or Intel C compiler and WinZip.

Installed Compaq Visual Fortran compiler(6.0 or higher version), or Intel Fortran compiler if you want to build HDF5 Fortran libraries.

Notes:

By default, WinZip will convert the Unix end of line format when extracting .tar file. This conversion will cause "false" failure in some HDF5 tools testings. Please uncheck the "TAR file smart CR/LF conversion" option in your WinZip to prevent the conversion when extracting .tar file. To uncheck the "TAR file smart CR/LF conversion" option: Invoke WinZip, go to "Options", select "Configuration..." Click the "Miscellaneous" tab and uncheck "TAR file smart CR/LF conversion" option, then click OK.

2. Set up a directory structure to unpack the library.

For example:

c:\ (any drive)

MyHDFstuff\ (any folder name)

 

3. Download the hdf5-1.8.x source code package

Use WinZip to extract the HDF5 package into c:\MyHDFstuff. This creates a directory called 'hdf5-1.8.x' under MyHDFstuff which contains several files and directories. Rename "hdf5-1.8.x" to "hdf5".

4. HDF5 provide options to do in-memory compress within HDF5 library.

Currently, two external compression libraries Zlib and Szip can be used with HDF5.

5. Define the following environment variables:

In this section, Zlib and Szip compression packages are assumed to be used. Please read Section V as well as this section if you do not want to use compression feature inside HDF5.

To define these environment variables:

Click "Start" -> "Control Panel" -> "System" -> "Advanced"  -> "Environment Variables". If you are logged on as administrator to the local computer AND want to let all other users use these two environment variables, click "New" under "System Variables" box; otherwise, click "New" under "User Variables" box. In the New Variable window, set

"Variable name" as HDF5_EXT_ZLIB

"Variable value" as zdll.lib, then click OK.

Similarly, you can set:

HDF5_EXT_SZIP environment variable as szlibdll.lib

Notes:

6. Set up path for external libraries and headers

Skip this part if you don't want to use ANY compression features provided by HDF5. Please do read Section V.

You have to read this part even if you want to only use Zlib or Szip. You also need to read Section V.

Invoke Microsoft Visual C++ and go to "Tools" and select "Options", find "Directories";

Notes:

Go to TOP Preconditions

Go to Table of Contents


Section I: What do we build and install?


Go to Table of Contents


Section II: How to build and test HDF5 libraries and tools


This section includes:

STEP 1: Building HDF5 libraries and tools

STEP 2: Testing HDF5 libraries and tools

STEP 3: Installing HDF5 Libraries

 

STEP 1: Building HDF5 libraries and tools

STEP 2: Testing HDF5 libraries and tools

HDF5 libraries and tools should be tested to make sure that they were built correctly.

We provide 2 options for users to test HDF5 libraries and tools.

Option 1: Automatic Testings

HDF5 comes with various test suites, all of which can be tested with hdf5check.bat batch file in c:\MyHDFstuff\hdf5 directory.

hdf5check batch file can be run with one of the following four options:

Options Illustration

hdf5check

test HDF5 C library and tools only

hdf5check enablecpp

test HDF5 C/C++ libraries and tools.

To use this option, HDF5 C++ libraries must have been built in step I.

hdf5check enablefortran

test HDF5 C/FORTRAN libraries and tools

To use this option, HDF5 Fortran libraries must have been built in step I.

hdf5check enableall

test HDF5 C/C++/FORTRAN libraries and tools

To use this option, HDF5 C++ and Fortran libraries must have been built in step I.

Invoke a command prompt window and run hdf5check with appropriate option.

Test results are saved in two files:

c:\MyHDFstuff\hdf5\check_results.txt

c:\MyHDFstuff\hdf5\tests_results.txt.

In general, you only need to check tests_results.txt. If all the tests passed, then you do not have to check check_results.txt. If some tests failed, check check_results.txt can help you figure out what was wrong.

Option 2: Step-by-step HDF5 libraries and tools testings

You can also test HDF5 libraries and tools one by one. There are four versions of HDF5 libraries and tools testing. They are:

We strongly suggest you to redirect your testing results into an output file so that you can easily check the testing results. You may use either Notepad or WordPad or whatever other windows word processor to check the results. For the purpose of printing, please choose font less than 14 for better alignment of the text.

DLLs listed below should be placed into the Windows system directory. A batch file named install_dll.bat is included in c:\MyHDFstuff\hdf5 directory. Run this batch file and the following HDF5 DLLs will be copied to the system directory.

STEP 3: Installing HDF5 Libraries

We provide a batch file for users to relocate all HDF5 libraries in one folder (C++ and Fortran libraries will also be copied into this folder if they have been built in step I). The file is called installhdf5lib.bat under c:\MyHDFstuff\hdf5 directory. Run the batch file, you may see a folder called hdf5lib under c:\MyHDFstuff\hdf5.

The <release> layout of <hdf5lib> should be:

You may also find the similar layout for the <debug>.

Go to TOP Section II

Go to Table of Contents


Section III: How to build Examples (Optional)


This section include:

How to build and test C examples

How to build and test C++ examples

How to build and test Fortran examples

How to build and test High Level C examples

How to build and test High Level Fortran examples

Notes:

 


Go to TOP Section XI

Go to Table of Contents


Need further assistance? email to hdfhelp@ncsa.uiuc.edu or go to http://hdf.ncsa.uiuc.edu/windows/questions to get help on windows

Thank  you  for  using  Hierarchical  Data  Format  (HDF)