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

The following instructions assume that the HDF5 source code package 
from HDF website (http://hdfgroup.org) is used.


***************************WARNINGS***********************************
Please read CAREFULLY about the following preconditions and notes first.

Preconditions
~~~~~~~~~~~~~

   1. Installed Microsoft Visual C++ 6.0 and 7zip or WinZip.
       
      1.1 Installed Intel Fortran Compiler (9.1 or higher version), 
          if you want to build HDF5 Fortran libraries.    

      Note: 1. 7zip is an open-source alternative to WinZip.  Some of the
            advanced functionality is disabled in WinZip unless you buy the
            software.  With 7zip, most of this functionality is included for
            free.
      
            2. 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.6.x source code package and use 7zip or WinZip to 
      extract the HDF5 package into c:\MyHDFstuff.  This creates a 
      directory called 'hdf5-1.6.x' under MyHDFstuff which contains 
      several files and directories.  Rename "hdf5-1.6.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.

      4.1 HDF5 uses Zlib version 1.2.3 for compression and Zlib is NOT
          distributed with HDF5 library in 1.6.x release. To use Zlib
          library, you have to install your own Zlib DLL library or go
          to ftp://ftp.hdfgroup.org/lib-external/zlib/1.2/bin 
          to download the Zlib library.
      
      4.2 HDF5 uses Szip version 2.0 for compression and Szip
          compression software is provided with HDF5 products starting
          from 1.6.0 release.  To use Szip 2.0 library, you can
          download Szip source codes and binaries from
          ftp://ftp.hdfgroup.org/lib-external/szip/2.0/bin/windows

          Please note that Szip is not a totally open-source free
          software.  For licensing issue of Szip, please check 
          "Licensing terms" at
          http://hdfgroup.org/doc_resource/SZIP/index.html.

      Compression feature inside HDF5 is optional. 
      
   5. Define the following environment variables: 

        HDF5_EXT_ZLIB
        HDF5_EXT_SZIP
      
      In this section, Zlib and Szip compression software 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", click "Control Panel", and then double-click
      "System".  On the "Advanced" tab, click "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
      and "Variable value" as zdll.lib, then click OK.
      
      Similarly, you can set:

      HDF5_EXT_SZIP environment variable as szlibdll.lib

      Notes:

         a. You might have to close and reopen running programs for
            the new environment variable settings to take effect. 

         b. c:\zlib122\zlib1.dll and c:\szip\dll\szlibdll.dll should
            be copied into the location that the application can find,
            one suggestion is to use the c:\WINNT\system or
            c:\WINDOWS\system
      
   6. Set up path for external libraries and headers
    
      Skip this part if you don't want to use ANY compression feature
      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";
      
      6.1 Find the box "Show directories for", choose 
          "Include files",
          If you cannot find your Zlib and Szip header path
          (for example, c:\zlib122\include, c:\szip\include)
          from the directory list, add the header path
          (c:\zlib122\include, c:\szip\include) to the 
          included directories.
      
      6.2 Find the box "Show directories for", choose "Library files",
          If you cannot find your Zlib and Szip library path
          (for example, c:\zlib122\lib, c:\szip\dll)
          from the directory list, add the library path
          (c:\zlib122\lib, c:\szip\dll) to the library directories.
      
Notes

   1. To build HDF5 C++ and Fortran libraries, please read through
      this document.
   
   2. For users who want to quickly build HDF5 library or do not 
      want to know HDF5 building and installation details, please 
      read INSATLL_Windows_Short.txt.

   3. For users who would like to build and test HDF5 package from the 
      command line, please read INSATLL_Windows_From_Command_Line.txt.
   
   4. HDF4-related tools are not built and released with HDF5 library
      packages any more. To obtain HDF4-related tools, please check
      http://hdfgroup.org/h4toh5/ and 
      ftp://ftp.hdfgroup.org/HDF5/h4toh5

   5. For DLL users, please do read and follow "DLL hints"
      at Section IV.

   6. For .NET users, please read section VI.
 
   7. For fortran users, please read section VII.

   8. We no longer support compaq viusal fortran compiler. Compaq visual
      fortran projects are still included for forward compatibility with intel
      fortran 9.1.  

   9. For users who would like to build, test and use HDF5 snapshot
      release, please read Section VIII.

------------------------------------------------------------------------

The following sections discuss installation procedures in detail:

   Section I   : What do we build and install
   Section II  : How to build and test HDF5 libraries and tools 
   Section III : How to build an application using the HDF5 library 
                 or DLL
   Section IV  : Helpful pointers
   Section V   : How to disable Gzip(Zlib)/Szip compression  
   Section VI  : How to build HDF5 in Visual Studio .NET or 2005
   Section VII : How to Build with Intel Fortran 9.1
   Section VIII: How to build and test HDF5 snapshot release
   Section IX  : How to build HDF5 Multithreaded Static Library
   Section X   : Misc. 

---------------------------------------------------------------------


Section I: What do we build and install? 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   1. Build and Install

      HDF5 static library: 
           debug and release version

      HDF5 Dynamic Link Library(DLL): 
           debug and release version as well as export libraries for DLL

      HDF5 tools:
           HDF5 tools 

   2. Build Only (Not included in the binary distribution)        

      HDF5 tool library:
           debug and release version

      HDF5 tool export library for DLL:
           debug and release version 

      HDF5 library testing programs:
           HDF5 library comprehensive tests
		
      HDF5 related tools testing programs:
           HDF5 tools comprehensive tests

   3. Examples (Not included in the binary distribution)

      HDF5 examples:
           Simple HDF5 C/C++/Fortran examples



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

    Note: To build and test Fortran libraries, please see
    Section VII.
    
    
    STEP 1: Building HDF5 libraries and tools
    =========================================

      1. Unpack all.zip
    
      Unpack windows\all.zip in c:\MyHDFstuff\hdf5\ directory.  If 
      prompted to overwrite files, select "Yes to All".

      2. Invoke Microsoft Visual C++ compiler
    
      Invoke Microsoft Visual C++.  From the main menu, go to "File"
      and select the "Open Workspace" option. Then open the
      c:\MyHDFstuff\hdf5\proj\all\all.dsw workspace. 

      You should find windows project files listed as "all files, 
      big files etc." on the left.        

      3. (Optional) HDF5 C++ libraries
    
      3.1 Skip this step if you do not want to build HDF5 C++ libraries
        
          Go to "Project" and select "dependencies";
          Select "all" in the "Select project to modify:" box,
          then enable the desired projects:
      
             dsets_cpp
             dsets_cppdll
             hdf5_cpp
             hdf5_cppdll
             testhdf5_cpp
             testhdf5_cppdll
               
      4. Select "Build", then Select "Set Active Configuration".

         In "Project configurations", select the active configuration

            "all -- Win32 Debug" to build debug versions of
                    single-threaded static libraries, Debug 
                    multithreaded DLLs and tests. 
                
                    or

            "all -- Win32 Release" to build release versions of
                    single-threaded static libraries, 
                    multithreaded DLLs and tests.

        Then build project "all".
       
        Warning messages can be ignored. 

        When the debug or release build is done the directories 
        listed below will contain the following files:

            c:\MyHDFstuff\hdf5\proj\hdf5\debug - 

               hdf5d.lib- the hdf5 static library

            c:\MyHDFstuff\hdf5\proj\hdf5\release - 

               hdf5.lib- the hdf5 static library

            c:\MyHDFstuff\hdf5\proj\hdf5dll\debug - 

               hdf5ddll.dll- DLL
               hdf5ddll.lib- the DLL export library                  

            c:\MyHDFstuff\hdf5\proj\hdf5dll\release - 

               hdf5dll.dll- DLL
               hdf5dll.lib- the DLL export library

            c:\MyHDFstuff\hdf5\test\libtest\debug - 
            and c:\MyHDFstuff\hdf5\test\libtest\release -
            
               libtest.lib - the internal library for test

            c:\MyHDFstuff\hdf5\test\libtestD\debug -

               libtestD.dll - the internal DLL for test
               libtestD.lib - the internal DLL export library for test

            c:\MyHDFstuff\hdf5\test\libtestD\release -

               libtestD.dll - the internal DLL for test
               libtestD.lib - the internal DLL export library for test

            c:\MyHDFstuff\hdf5\tools\toolslib\debug -
            and c:\MyHDFstuff\hdf5\tools\toolslib\release -

               toolslib.lib- the internal tools library

            c:\MyHDFstuff\hdf5\tools\toolslibD\debug -
            and c:\MyHDFstuff\hdf5\tools\toolslibD\release -

               toolslibD.dll- DLL
               toolslibD.lib- the internal DLL export library for tools 

            c:\MyHDFstuff\hdf5\tools\"tools directory"-
            where tools are located		

        The directories listed below will contain the following files
        ONLY when you choose to build HDF5 C++ libraries:
       
            c:\MyHDFstuff\hdf5\proj\hdf5_cpp\debug - 
               
               hdf5_cppd.lib- the HDF5 C++ API static library

            c:\MyHDFstuff\hdf5\proj\hdf5_cpp\release - 
               
               hdf5_cpp.lib- the HDF5 C++ API static library

            c:\MyHDFstuff\hdf5\proj\hdf5_cppdll\debug - 
               
               hdf5_cppddll.dll- the HDF5 C++ API DLL
               hdf5_cppddll.lib- the C++ API DLL export library
               
            c:\MyHDFstuff\hdf5\proj\hdf5_cppdll\release - 
               
               hdf5_cppdll.dll- the HDF5 C++ API DLL
               hdf5_cppdll.lib- the C++ API DLL export library
            
              

    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.

      To use automatic testing batch file, you must build both HDF5 
      release and debug libraries.

      hdf5check batch file can be run with one of the following four
      options:
   
      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 Section VII.      
      
      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 and Section VII.

      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
      possibly four versions of HDF5 libraries and tools testings. 

      They are:

      release version
      release dll version
      debug version
      debug dll version

      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.

      hdf5\proj\hdf5dll\release\hdf5dll.dll
      hdf5\proj\hdf5dll\debug\hdf5ddll.dll
      hdf5\test\libtestD\release\libtestD.dll
      hdf5\test\libtestD\debug\libtestDd.dll

      1. HDF5 library testing 

      cd into the hdf5\test directory. 

         (1) basic tests
            
             Go to a) b) c) or d) to test your chosen version

             a) release static version
             type:             
                hdf5test release >"Your output filename" 

             b) release dll version
             type:
                hdf5test release dll > "Your output filename"
				
             c) debug static version
             type: 
                hdf5test debug >"Your output filename"

             d) debug dll version
             type:
                hdf5test debug dll >"Your output filename"
            
         (2) timing tests

             Go to a) b) c) or d) to test your chosen version
 
             a) release static version
             type:             
                hdf5timingtest release >"Your output filename" 

             b) release dll version
             type:
                hdf5timingtest release dll >"Your output filename"
				
             c) debug static version
             type: 
                hdf5timingtest debug >"Your output filename"

             d) debug dll version
             type:
                hdf5timingtest debug dll >"Your output filename"

      Use Notepad or WordPad to check results. You should 
      not find any FAILED marks in your output files.

      2. HDF5 tools testing
 
      To test HDF5 tools, cd back into hdf5 directory and then cd into 
      tools directory(c:\MyHDFstuff\hdf5\tools).  The HDF5 tools testing
      results are saved into output files in tools directory by the
      testhdf5tools.bat as described below.

      Go to a) b) c) or d) to test your chosen version

         a) release static version
         type:             
            testhdf5tools release
         output file: toolstest_release.txt 

         b) release dll version
         type:
            testhdf5tools release dll
         output file: toolstest_releasedll.txt 
				
         c) debug static version
         type: 
            testhdf5tools debug
         output file: toolstest_debug.txt 

         d) debug dll version
         type:
            testhdf5tools debug dll
         output file: toolstest_debugdll.txt 
               
      Use Notepad or WordPad to check results. You should 
      not find any FAILED marks in your output files.
    
      3. HDF5 C++ library test
  
      Skip this step UNLESS you have built HDF5 C++ libraries
      and want to test them.
     
      DLLs listed below should be placed into to the Windows system
      directory.  A batch file named install_cppdll.bat is included in 
      c:\MyHDFstuff\hdf5 directory.  Run this batch file and the 
      following HDF5 C++ DLLs will be copied to the system directory.
       
         hdf5\proj\hdf5_cppdll\release\hdf5_cppdll.dll
         hdf5\proj\hdf5_cppdll\debug\hdf5_cppddll.dll

      Run hdf5cpptest.bat in the hdf5\c++\test directory at the 
      command prompt as below:
     
         hdf5cpptest release >"Your output filename"
         hdf5cpptest release dll >"Your output filename"
         hdf5cpptest debug >"Your output filename"
         hdf5cpptest debug dll >"Your output filename"

      Use Notepad or WordPad to check results. You should 
      not find any FAILED marks in your output files.
     
     
    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 and Section VII,
      respectively).  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:
    
      release\include   --  HDF5 header files
      release\bin       --  HDF5 static tool executables
      release\bindll    --  HDF5 DLL tool executables
      release\lib       --  HDF5 static libraries
      release\dll       --  HDF5 DLLs
       
      You may also find the similar layout for the <debug>.


    STEP 4: Building HDF5 C/C++ examples (Optional)
    =======================================================

      Simple examples have been provided for users to test HDF5
      C/C++ library and tools.

      Note: 
        1) To build HDF5 C++ examples, HDF5 C++ library must have been
        built in step I.

        2) To build HDF5 Fortran examples, please seee Section VII, step 3.

        3) To build HDF5 HL C examples, HDF5 HL library must have been
        built in step I.

        4) By default, the debug versions of HDF5 C/C++ examples
        are linked with the debug versions of HDF5 C/C++
        libraries and DLLs.  The debug versions of HDF5 C/C++
        examples will fail if they are linked with HDF5 binary
        distribution, which only includes the release versions of
        HDF5 C/C++ libraries and DLLs.


      <<---To build and test HDF5 C examples--->>

        1. Invoke Microsoft Visual C++, go to "File" and select
        the "Open Workspace" option. 
      
        Then open the workspace
        c:\MyHDFstuff\hdf5\examples\allexamples\allexamples.dsw.

        2. Select "Build", then Select "Set Active Configuration".

        In "Project configurations", select the active configuration

        "allexamples -- Win32 Debug" to build debug versions of the
                        C examples.

        and

        "allexamples -- Win32 Release" to build release versions the 
                        C examples.

        When the debug build or release build is done, there should be the 
        following subdirectories in c:\MyHDFstuff\hdf5\examples\

          attributetest
          attributetestdll
          chunkread
          chunkreaddll
          compoundtest 
          compoundtestdll
          extendwritetest 
          extendwritetestdll
          grouptest 
          grouptestdll
          readtest 
          readtestdll
          selecttest 
          selecttestdll
          writetest 
          writetestdll

        3. Invoke a command prompt window and run the batch file 
        InstallExamples.bat which resides in the top level directory
        (c:\MyHDFstuff\hdf5).  This file creates 4 new directories, 
        examplesREL, examplesRELDLL, examplesDBG, and examplesDBGDLL,
        in the c:\MyHDFstuff\hdf5\examples directory and places all the
        executables in it.  Both the release and debug versions of the
        examples should be built before this step is done.

        4. We provide a batch file named testExamples.bat and an expected
        examples tests output file named testExamples_exp_output.txt
        in c:\MyHDFstuff\hdf5\examples directory for you to test HDF5
        C examples. You need to run InstallExamples.bat before running 
        testExamples.bat. 
      
        testExamples.bat batch file has 4 options:

         testExamples release     -- for release version

         testExamples release dll -- for release DLL version

         testExamples debug       -- for debug version

         testExamples debug dll   -- for debug DLL version

        Invoke a command prompt window and run testExamples with
        appropriate options.  You should get "All HDF5 C examples tests
        passed." when the C examples are built successfully. Otherwise,
        the difference between the expected outputs and actual outputs
        will be given.

      <<---To build and test HDF5 C++ examples--->>

        1. Invoke Microsoft Visual C++, go to "File" and select
        the "Open Workspace" option. 

        Then open the workspace
        c:\myHDFstuff\hdf5\c++\examples\allcppexamples\allcppexamples.dsw.

        2. Select "Build", then Select "Set Active Configuration".

        In "Project configurations", select the active configuration

        "allcppexamples -- Win32 Debug" to build debug versions of the
                           C++ examples.

        and
	
        "allcppexamples -- Win32 Release" to build release versions the 
                           C++ examples.

        When the debug build or release build is done, there should be  
        the following subdirectories in 
        c:\MyHDFstuff\hdf5\c++\examples\

          chunkstest
          chunkstestdll
          compoundtest 
          compoundtestdll 
          createtest 
          createtestdll 
          extend_dstest 
          extend_dstestdll 
          h5grouptest 
          h5grouptestdll 
          readdatatest 
          readdatatestdll 
          writedatatest 
          writedatatestdll 

        3. Invoke a command prompt window and run the batch file 
        InstallcppExamples.bat which resides in the top level directory
        (c:\MyHDFstuff\hdf5).  This file creates 4 new directories, 
        cppexamplesREL, cppexamplesRELDLL, cppexamplesDBG,
        and cppexamplesDBGDLL, in the c:\MyHDFstuff\c++\examples
        directory and places all the executables in it.  Both the 
        release and debug versions of the examples should be built
        before this step is done.

        4. We provide a batch file named testcppExamples.bat in
        c:\MyHDFstuff\hdf5\c++\examples directory for you to test HDF5
        C++ examples. You should run InstallcppExamples.bat before
        running testcppExamples.bat.
      
        testcppExamples.bat batch file has 4 options:

         testcppExamples release     -- for release version

         testcppExamples release dll -- for release DLL version

         testcppExamples debug       -- for debug version 

         testcppExamples debug dll   -- for debug DLL version 

        Invoke a command prompt window and run testcppExamples with
        appropriate options.  You should get "All HDF5 C++ examples 
        tests passed." when the C++ examples are built successfully.  
        Otherwise, the difference between the expected outputs and 
        actual outputs will be given.


        <<----To build and test HDF5 HL C examples--->>

        1. Invoke Microsoft Visual C++, go to "File" and select
        the "Open Workspace" option. 
      
        Then open the workspace
        c:\MyHDFstuff\hdf5\hl\examples\allhlcexamples\allhlcexamples.dsw.

        2. Select "Build", then Select "Set Active Configuration".

        In "Project configurations", select the active configuration

       "allhlcexamples -- Win32 Debug" to build debug versions of the
                          HL C examples.

        and

       "allhlcexamples -- Win32 Release" to build release versions the 
                          HL C examples.

       When the debug build or release build is done, there should be the 
       following subdirectories in c:\MyHDFstuff\hdf5\hl\examples

            ex_images
            ex_imagesdll
            ex_lite
            ex_litedll
            ex_table
            ex_tabledll

        3. We provide a batch file 
        c:\MyHDFstuff\hdf5\hl\examples\test_hlcexamples.bat to test HL C
        examples.

        testhlcexamples.bat batch file has 4 options:

         testhlcexamples release     -- for release version

         testhlcexamples release dll -- for release DLL version

         testhlcexamples debug       -- for debug version

         testhlcexamples debug dll   -- for debug DLL version

        Invoke a command prompt window and run testhlcexamples.bat with
        appropriate options.  
      
        If you get messages:
 
                      "All of the HL C Examples Passed!"

        All of the HL C examples are built successfully.
      
        If you get messages:
         
                      "Some HL C Examples Failed!"

        One or more of the HL C examples Failed. 



Section III: Building an application using the HDF5 library or DLL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Waring: The instructions below will only describe how to build an
            application using the release version of the HDF5 library 
            or DLL. To use the debug version of the HDF5 library or 
            DLL, you need to substitute the release version of the 
            HDF5 library or DLL with the debug version.

    To use HDF5 static library
    ==========================

    To build an application that uses the HDF5 static library the
    following locations will need to be specified for locating header
    files and linking with the HDF static library, for example:

    c:\MyHDFstuff\hdf5\hdf5lib\include
    c:\MyHDFstuff\hdf5\hdf5lib\release\lib

    if you have installed HDF5 library in Section II, step 3.

    We assume that you will use Zlib and Szip compression with HDF5
    library.

    To specify these locations in the settings for your VC++ project,
    you may choose one of the following two methods.

    1) Method One

    Step 1: 
    To insert the path that specifies HDF5 and Zlib, Szip header files:

    1. Open your VC++ project in Microsoft Visual C++ and make sure it
       is the active project.

    2. Go to the Project menu and chose the "Settings" option.

    3. Choose the build configuration you would like to modify in the
       drop down menu labeled with "Settings For:"

    4. Choose the C/C++ tab

    5. Choose "Preprocessor" in the drop down menu labeled with
       "Category:"

    6. In a text-area labeled with "Additional include directories:",
       add HDF5, Zlib, and Szip header files directories.  For example:
       
          c:\MyHDFstuff\hdf5\hdf5lib\include
          c:\zlib122\include
          c:\szip\include

       Then click OK.

    7. (optional) To use HDF5 Fortran static library, the location of 
       Fortran module files should be specified by following
       Project->Settings->Fortran->Preprocessor,
       and in a test-area labeled with "INCLUDE and USE Paths:", add
       HDF5 Fortran module files directories.  For example:

          c:\MyHDFstuff\hdf5\hdf5lib\include

    Step 2: 
    To link the HDF5 library with your application:

    1. Open your VC++ project in Microsoft Visual C++ and make sure it
       is the active project.

    2. Go to the Project menu and chose the "Add to Project" option and
       then "Files" option.

    3. Change the "Files of type:" to "Library Files (.lib)"

    4. Navigate through the directories until you find the location of 
       the hdf5.lib. 

    5. Select hdf5.lib and click OK.

    6. repeat 1-5, to select zdll.lib and szlibdll.lib.

    7. (optional) repeat 1-5, to select hdf5_cpp.lib to link with HDF5
       C++ static library.

    8. (optional) repeat 1-5, to select hdf5_fortran.lib to link with
       HDF5 Fortran static library.

    2)  Method Two

    1. Go to Tools->Options->Directories,

    2. Insert the correct HDF5, Zlib, Szip paths for both headers
       (include) and libraries.  For example, 
       
          c:\MyHDFstuff\hdf5\hdf5lib\include
          c:\MyHDFstuff\hdf5\hdf5lib\lib
          c:\zlib122\include
          c:\zlib122\lib
          c:\szip\include
          c:\szip\dll

    3. Go to the Project menu and choose the "Settings" option.

    4. Find the "link" option and "Input" category, insert 
       "zdll.lib, szlibdll.lib, hdf5.lib".

    5. (Optional) repeat 3-4, to insert "hdf5_cpp.lib" if you want to 
       use HDF5 C++ static library.

    6. (Optional) repeat 3-4, to insert "hdf5_fortran.lib" if you want
       to use HDF5 Fortran static library.


    To use the DLL:

    1. Follow the steps for specifying the location of the header files
       as shown above.

    2. Follow the steps for linking the HDF5 library as shown above
       except now link the export library that is created with the DLL.
       The export library is called hdf5dll.lib for HDF5 C libray,
       hdf5_cppdll.lib for HDF5 C++ library, and hdf5_fortrandll.lib
       for HDF5 Fortran library.

    3. Place the DLL in a location that Windows will be able to 
       locate it. The searched path and order for DLL's is

       a) The directory where the executable module for the current
          process is located.
       b) The current directory. 
       c} The Windows system directory. The GetSystemDirectory 
          function retrieves the path of this directory. 
       d) The Windows directory. The GetWindowsDirectory function
          retrieves the path of this directory.
       e) The directories listed in the PATH environment variable.
 
    4. To modify your own application settings, please DO FOLLOW the 
       "DLL Hints" at section IV "HELPFUL POINTERS".


Section IV: HELPFUL POINTERS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Here are some notes that may be of help if you are not familiar 
    with using the Visual C++ Development Environment.

    Project name and location issues: 
       
    If you must install all.dsw and all.dsp in another directory,
    relative to hdf5 directory, you will be asked to locate the 
    sub-project files, when you open the project all.dsw.

    If you want to rename all (the entire project), you will need to
    modify two files all.dsw and all.dsp as text (contrary to the
    explicit warnings in the files).

    You can also modify all.dsw and all.dsp as text, to allow these 2
    files to be installed in another directory.

  
    Settings... details:

    If you create your own project, the necessary settings can be read
    from the all.dsp file(as text), or from the Project Settings in the
    Developer Studio project settings dialog.

    Project
       Settings
          C/C++
             Category
                Code Generation
                   Use run-time Library
                      These are all set to use Single-Threaded

    DLL... hints:
  
    If you want to use DLL versions of HDF5 library in your application, 
    you should  
      1) put HDF5 DLL into windows system directory
      2) add HDF5 DLL export library into your project
      3) Follow "Settings... details" into the last line:
         change Single-Threaded into Multithreaded DLL or 
         Debug Multithreaded DLL
      4) Follow "Settings.. details" into PreProcessor:
         Project
            Settings
               C/C++
                  Category
                     PreProcessor

         Find PreProcessor definations and Add _HDF5USEDLL_ at the
         end of the PreProcessor definitions to use HDF5 C DLL.

      5) (optional) repeat 4), add HDF5CPP_USEDLL at the
         end of the PreProcessor definitions to use HDF5 C++ DLL.

      6) (optional) Follow Project->Settings->Fortran->Category->
         General->Predefined Preprocess or Symbols, and add 
         "HDF5F90_WINDOWS" to use HDF5 Fortran DLL.


Section V: How to disable Gzip(Zlib)/Szip compression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


     Warning: When you modify the H5pubconf.h file as described below,
              DO NOT just change the values of these macros from 1 to 0.
              Please DO remove(or comment out) appropriate lines.
         
    1. Disable Gzip compression 

    If you would like to remove Gzip compression from the HDF5
    library, follow the steps below.

      1.1 Open the H5pubconf.h file from the c:\MyHDFstuff\hdf5\src
          directory and remove(or comment out) the following two lines:

             #define H5_HAVE_ZLIB_H 1
             #define H5_HAVE_FILTER_DEFLATE 1

          then save the file.
	  
      1.2 Delete HDF5_EXT_ZLIB environment variable if you have
          set it in preconditions.
   
      1.3 Run-compile HDF5 library according to section II.

      When you disable Gzip, you may get the following message
      when building HDF5 libraries:

      The following environment variables were not found
      $(HDF5_EXT_ZLIB)

      This message can be ignored.

    2. Disable Szip compression (both encoder and decoder)

      If you would like to remove Szip compression from the HDF5
      library, follow the steps below.

      2.1 Open the H5pubconf.h file from the c:\MyHDFstuff\hdf5\src
          directory and remove(or comment out) the following three
          lines: 

             #define H5_HAVE_SZLIB_H 1
             #define H5_HAVE_FILTER_SZIP 1
             #define H5_SZIP_CAN_ENCODE 1
		   
          then save the file.
	
      2.2 Delete HDF5_EXT_SZIP environment variable if you have
          set it in preconditions.

      2.3 Run-compile HDF5 library according to section II.

      When you disable Szip, you may get the following message 
      when building HDF5 libraries:

      The following environment variables were not found
      $(HDF5_EXT_SZIP)

      This message can be ignored.

    Note:   

    To disable Gzip and Szip at the same time, just follow 1.1~1.3
    and 2.1~2.4 and run-compile HDF5 library according to section II.

    3. Disable Szip encoder

      If you would like to just disable Szip encoder from the HDF5
      library while keeping Szip decoder enabled, follow the steps
      below.

      3.1 Download Szip library without encoder

          Szip library is different if you want to disable Szip 
          encoder. Download szip_noencoder binaries from
          ftp://ftp.hdfgroup.org/lib-external/szip/2.0/bin/windows.
          The Szip library and header path should also be set up
          accordingly (refer to precondition 6).
   
      3.2 Open the H5pubconf.h file from the c:\MyHDFstuff\hdf5\src
          directory and remove (or comment out) the following line: 

             #define H5_SZIP_CAN_ENCODE 1
		   
          then save the file.
	
      3.3 Run-compile HDF5 library according to section II.


Section VI: How to build HDF5 in Visual Studio .NET or 2005
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    We just briefly introduce you how to build HDF5 in Visual Studio 
    .NET 2003 or 2005.

    1. Build HDF5 in Visual Studio .NET or 2005

    1.1 You need to specify the zlib and szip include header files 
    and libraries under Tools->Options->Projects->VC++ Directories 
    and choose Include libraries under the category of 
    "show directories for" to add the corresponding path if you want 
    to use compression feature inside HDF5.
    
    1.2 Open the old workspace file with the "Open solution" option,
    Visual Studio will ask you whether you want to convert all VS 
    6.0 project files to .NET corresponding project files, choose 
    <CONVERT ALL>, .NET will automatically convert the data space 
    file to solution file.
    
    1.3 Then find  "Build" and go to "Configuration Manager"; choose
    "release" or "debug", if you don't want to build C++ or Fortran 
    libraries, you need to explicitly turn off project files in the 
    "Configuration Manager" and then choose "build all".
   
    1.4 If you want to change some project setting, select the project 
        and right click the button to choose Properties; find the 
        similar menu there as in 6.0.

    NOTE: 
    Please read section V if you do not want to use compression
    feature inside HDF5.

    
Section VII: Building with Intel Fortran 9.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Notes:  1. For Intel Compiler users, Intel fortran Compiler 9.1 is currently
            supported-- please see below.  Intel Compiler verion
            7.x and 8.x are no longer supported.

            2. Intel Fortran 9.1 works only under .Net 2003 or Visual Studio 2005 
            environments

            3. For Visual Studio 2005 users, parallel builds should be disabled.  To
            do so: Go to  Tools > Options > Projects and Solutions > Build and Run. 
            Set "maximum number of parallel project builds" to 1.

  Preconditions:

     a. Setup Szip Library for Intel Compiler.

     Intel compilers use different Szip library from other compilers.
     Szip source codes or binaries for Intel compiler can be downloaded
     from the following address:

     ftp://ftp.hdfgroup.org/lib-external/szip/2.0/bin/windows.

     b. 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++ .Net 2003 or 2005.  From the main
      menu, Go to Tools > Options > Intel(R) Fortran.
      In the right panel, make sure you "Selected Compiler" is Intel Fortran 9.1.
      Click rightmost box for "Libraries",
      Add Zlib and Szip Library Path (c:\zlib122\lib, c:\szip\dll for example)
      Click rightmost box for "Includes",
      Add Zlib and Szip header path (c:\zlib122\include c:\szip\include, for example).
      Then click "OK".


  1. Build Fortran Libraries under Intel Fortran Compiler 9.1

      Note: This step will build HDF5 Static and DLL C and C++
            Library using .Net 2003 or Visual 2005 Compiler as well as HDF5
            Static and High Level Fortran Library using Intel
            Fortran 9.1 Compiler.

            
      1.1 Open all.dsw and Convert Project Files (.dsp) to Visual
            C++ .Net Format (.vcproj)

      Invoke Microsoft Visual C++ .Net 2003.  From the main menu, go to
      "File" and select "Open Solution". In the "Open Solution" window,
      Change "Files of type" to "All Project Files". Choose "all.dsw"
      under the directory c:\MyHDFstuff\hdf5\windows\proj\all. In the
      pop up window, choose "Yes To All" to convert all project files
      to Visual C++ .Net project format.

      1.2 Extract Compaq Fortran Project Files

       a. Select project "flush1_fortran" in the Solution Explorer
       window. In the Project menu, select
       "Extract Compaq Visual Fortran Project".

       Do the same thing for the following project files, but for now, skip
       the projects labelled "**SKIP**":

        flush1_fortrandll
        flush2_fortran
        flush2_fortrandll
        hdf5_fortran
        hdf5_fortrandll
        **SKIP** libtest_fortran
        libtest_fortrandll
        testhdf5_fortran
        testhdf5_fortrandll
        
             
       b. Select project "libtest_fortran" in the Solution
       Explorer window. In the Project menu, select
       "Extract Compaq Visual Fortran Project". Since Project
       file "libtest_fortran" contain both C and Fortran code,
       you will be asked to specify which project, either
       Fortran or C/C++, will serve as the main project for
       this mixed language projects. Choose
       "The Intel Fortran project" as the the main project and
       click "OK".

       Note: In Visual Studio 2005, you may receive a message that 
       says "The attempt to convert the Fortran project file failed.
       The project file (.dsp) has not been converted."  This message
       can safely be ignored.


      1.3: Fix Project Output
      
      1) Change libtest_fortran_lib Release Output
      
        For .Net 2003:
            Choose configuration to be "Release". Right click project 
            libtest_fortran_lib. Click "librarian" on the left panel. Change 
            ".\Release\libtest_fortran.lib" to ".\Release\libtest_fortranr.lib" 
            on the panel of Output File; then click "OK".

        For Visual Studio 2005:
            In Build > Configuration Manager, set the configuration to "Release"
            and click OK.  Then, right click on the project libtest_fortran_lib
            and select "Properties".  From the left pane, choose Librarian >
            General.  In the right pane, under Output File, change
            ".\Release\libtest_fortran.lib" to ".\Release\libtest_fortranr.lib" 
            Then click "OK".
            
      2) Change hdf5_fortran Debug Output
      
        For .Net 2003:
            Choose configuration to be "Debug". Right click project 
            hdf5_fortran. Click "librarian" on the left panel. Change 
            "$(OutDir)/$(ProjectName).lib" to "$(OutDir)/hdf5_fortrand.lib" 
            on the panel of Output File; then click "OK".

        For Visual Studio 2005:
            In Build > Configuration Manager, set the configuration to "Debug"
            and click OK.  Then, right click on the project hdf5_fortran
            and select "Properties".  From the left pane, choose Librarian >
            General.  In the right pane, under Output File, change
            "$(OutDir)/$(ProjectName).lib" to "$(OutDir)/hdf5_fortrand.lib" 
            Then click "OK".
            

      1.4: Change project dependencies


      To check the project dependencies,
      right click the selected project, you should see "Project Dependencies" 
      on the menu, click "Project Dependencies", You should see a "Project 
      Dependencies" panel, with the selected project and the projects it 
      depends on checked under "Depends on" list.  
      
      The project "libtest_fortran_lib" will need to be added as a
      dependnecy to the following projects:

            flush1_fortran
            flush2_fortran
            libtest_fortran
            testhdf5_fortran


      1.5 Building HDF5 C/C++/Fortran Libraries and Tools

      Select "Build", then Select "Configuration Manager".

      Select "Debug" or "Release"

      Select "Ok". Select "Build" -> "Build" or "Rebuild All" to
      build Debug or Release version of HDF5 C, C++, fortran
      Library using Intel fortran 9.1 Compiler with .Net 2003 or .Net 2005.

    
  2. Test HDF5 Static and High Level Fortran Library

    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 used to test HDF libraries with Fortran with
       the following options:

          hdf5check enablefortran    test HDF5 C/FORTRAN libraries and
                                     tools


          hdf5check enableall        test HDF5 C/C++/FORTRAN libraries
                                     and tools
                                     To use this option, HDF5 C++ and
                                     Fortran libraries must have been
                                     built.

       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

       Note: This section provides step-by-step instructions for testing the
       Fortran librariy and tools only.  To test the rest of the HDF5 library
       and tools, please see Section II, Step 2.
       
       
       a. Test HDF5 Static Fortran Library

       Go to directory c:\myHDFstuff\hdf5\fortran\test, Run batch file
       testhdf5_fortran.bat with the following two options to test
       fortran static library

         testhdf5_fortran release >> "Your output file name"
         testhdf5_fortran debug   >> "Your output file name"

       Check your output files, there should be no "failures" at all.

       b. Test HDF5 High Level Fortran Library

       Go to directory c:\myHDFstuff\hdf5\hl\fortran\test, Run batch file
       testhdf5_fortran.bat with the following two options to test
       fortran static library

            test_hdf5_hl_fortran release >> "Your output file name"
            test_hdf5_hl_fortran debug   >> "Your output file name"

       Check your output files, there should be no "failures" at all.
    
  3. (Optional) Build HDF5 Fortan and HL Fortran Examples
  
        Note: This section only covers building Fortran and HL Fortran examples.
        For other examples, please see Section II, step 4.
 
        To build and test HDF5 Fortran example:

            1. Invoke Intel Fortran Compiler 9.1 or above under Microsoft 
            Visual Studio development environment, go to "File" and select
            the "Open Workspace" option.

            Then open the workspace
            c:\MyHDFstuff\hdf5\fortran\examples\allf90examples\allf90examples.dsw.

            2. Select "Build", then Select "Set Active Configuration".

            In "Project configurations", select the active configuration

            "allf90examples -- Win32 Debug" to build debug versions of the
                               Fortran examples.

            and
    
           "allf90examples -- Win32 Release" to build release versions the 
                              Fortran examples.

            When the debug build or release build is done, there should 
            be the following subdirectories in 
            c:\MyHDFstuff\hdf5\fortran\examples\

              attreexampletest
              attreexampletestdll 
              compoundtest 
              compoundtestdll
              dsetexampletest
              dsetexampletestdll
              fileexampletest
              fileexampletestdll
              groupexampletest
              groupexampletestdll
              grpdsetexampletest
              grpdsetexampletestdll
              grpittest
              grpittestdll
              grpsexampletest
              grpsexampletestdll
              hyperslabtest
              hyperslabtestdll
              mountexampletest
              mountexampletest
              refobjexampletest
              refobjexampletestdll
              refregexampletest
              refregexampletestdll
              rwdsetexampletest
              rwdsetexampletestdll
              selecteletest
              selecteletestdll

            3. Invoke a command prompt window and run the batch file 
            Installf90Examples.bat which resides in the top level 
            directory (c:\MyHDFstuff\hdf5).  This file creates 4 new 
            directories, f90examplesREL, f90examplesRELDLL, f90examplesDBG, 
            and f90examplesDBGDLL, in the c:\MyHDFstuff\fortran\examples 
            directory and places all the executables in it.  Both the 
            release and debug versions of the examples should be built 
            before this step is done.
 
Section VIII: Building and testing HDF5 snapshot release
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Note: 
    This section is only for users who would like to build and test 
    HDF5 snapshot release.

    If you want to test and build HDF5 snapshot release, you need 
    extra steps to automatically generate H5Tinit.c before going to 
    section II step 1(2).

    Previous step: section II, step 1(1).
    
    Extra steps:
    1) After extracting all.zip to the correct path, open the 
    c:\myHDFstuff\hdf5\misc\typegen\typegen.dsw.
    
    2) Build the project file.

    3) Invoke command prompt and go to c:\myHDFstuff\hdf5\src.

    4) type H5Tinit.exe >H5Tinit.c

    5) Go back to section II, continue with step 1(2).

    
Section IX: How to build Multi-threaded version of HDF5 library  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Notes: Preconditions and Section I also apply to this section. Users who 
           want to build Multi-threaded version of HDF5 library, please read 
           those two sections carefully before go to the following part.
                  
    1. Unpack all.zip
    
       Unpack windows\all.zip in c:\MyHDFstuff\hdf5\ directory.  If 
       prompted to overwrite files, select "Yes to All".
      
    2. Invoke Microsoft Visual C++ compiler
        
       Invoke Microsoft Visual C++.  From the main menu, go to "File"
       and select the "Open Workspace" option. Then open the
       c:\MyHDFstuff\hdf5\proj\all\all.dsw workspace. 

       You should find windows project files listed as "all files, 
       big files etc." on the left.        

    3. Please refer to Section II, Step 1(3) to set the dependencies of 
       project "all.dsp".

    4. Change Project settings

       Choose "Project"->"Settings", 
       In the left pane of the window "Project Settings",  from the drop 
       down box to the right of "Setting For:", choose "Win32 Release"; 
       Highlight all of the static project file in the left lower pane 
       by pressing "ctrl" key while clicking the project file name.
         
       In the right pane of the "Project Settings" window, choose "C/C++".
       From the drop down box to the right of "Category",  choose 
       "Code Generation", under "Use run-time library:", 
       "Single-Threaded" should appear. If it is blank inside this
       box, check if you highlight some dll project files. Change 
       "Single-Threaded" to "Multithreaded".
        
       In the left pane of the window "Project Settings",  from the drop 
       down box to the right of "Setting For:", choose "Win32 Debug"; 
       Highlight all of the static project file in the left lower pane 
       by pressing "ctrl" key while clicking the project file name.
         
       In the right pane of the "Project Settings" window, choose "C/C++".
       From the drop down box to the right of "Category",  choose 
       "Code Generation", under "Use run-time library:", 
       "Debug Single-Threaded" should appear. If it is blank inside this 
       box, check if you highlight some dll project files. Change
       "Debug Single-Threaded" to "Debug Multithreaded"
         
    5. Go back to Section II, Step 1 (4), continue to build and test HDF5 library.


Section X: Misc.
~~~~~~~~~~~~~~~~~~~

    1) drivers we support

    The default driver on windows we support is sec2 driver. However, 
    stdio driver is also supported. If you want to use stdio driver 
    in your application, you may set environment variable HDF5_DRIVER 
    to "stdio".

    On windows 2000/XP, the following steps should be followed to set
    the environment variable,

      a) Go to Control panel and find "system",
      b) Click "system" and choose "advanced",
      c) Choose Environment Variables
      d) Add new variable "HDF5_DRIVER"
      e) set the "HDF5_DRIVER" to "stdio"

    Reminder: 
    If you don't want to use stdio driver, please remember to 
    delete the environment variable "HDF5_DRIVER" or change the 
    variable value to "sec2".

*******************************************************************
Please send email to help@hdfgroup.org for further assistance.

