Install HDF4.1 Release 5 on Windows NT, Windows 2000 and Windows 98 The instructions which follow assume that you will be using one of the 'zip' files that we provide, either the binary code release (HDF41r5.zip) or the source code release (HDF41r5s.zip). In building HDF from source code you may select between two build environment options ( with Fortran or without Fortran support depending on your application and environment needs ). The following sections discuss in details installation procedures. Building from Binary Code Release (HDF41r5.zip) =============================================== To install the HDFand MFHDF libraries and utilities, it is assumed that you have done the following: 1. Create a directory structure to unpack the library. For example: c:\ (any drive) MyHDFstuff\ (any folder name) 2. Copy the binary archive (HDF41r5.zip) to that directory and unpack it by running WinZip on HDF41r5.zip (the binary archive). This should create a directory called 'HDF41r5' which contains the include files, libraries and pre-compiled utilities. 3. If you are building an application that uses the HDF libraries the following locations will need to be specified for locating header files and linking in the HDF libraries: C:\MyHDFstuff\HDF41r5\lib or C:\MyHDFstuff\HDF41r5\dlllib C:\MyHDFstuff\HDF41r5\include Note: The ws2_32.lib needs to linked with your executable if using the static mfhdf library. The ws2_32.lib can be found in your Microsoft Visual C++ directory under the lib folder. Building from Source Code Release (HDF41r5s.zip) ================================================ STEP I: Preconditions To build the HDF and MFHDF libraries ( single-threaded static or multi-threaded DLL import libraries) and utilities, it is assumed that you have done the following: 1. Installed MicroSoft Developer Studio, and Visual C++ 6.0. Visual Fortran 6.0 is needed if you are going to build the full HDF Library with Fortran support. 2. Set up a directory structure to unpack the library. For example: c:\ (any drive) MyHDFstuff\ (any folder name) 3. Copy the source distribution archive to that directory and unpack it using the appropriate archiver options to create a directory hierarchy. Run WinZip on HDF41r5s.zip (the entire source tree). This should create a directory called 'HDF41r5' which contains several files and directories. Note: If you are building from the UNIX source code, then you will need to replace the jconfig.h and netcdf.h file as follows ( this assumes that the HDF Library tree resides under HDF41r5 directory ): copy C:\MyHDFstuff\HDF41r5\hdf\jpeg\config\jwin32.h C:\MyHDFstuff\HDF41r5\hdf\jpeg\jconfig.h copy C:\MyHDFstuff\HDF41r5\mfhdf\libsrc\win32cdf.h C:\MyHDFstuff\HDF41r5\mfhdf\libsrc\netcdf.h You do not need to do this if you are using the HDF41r5s.zip file! STEP II: Select Installation type and Build. You may select one of 2 ways to build the HDF libraries and utilities, depending on your environment and application needs. Option I, (select Win32.nofortran.zip) This is the "NOFORTRAN" configuration : It builds debug and release single-threaded and multi-threaded versions of the HDF libraries, tests, and utilities. There is no Fortran support. Option II, (select Win32.zip) This is "WITH FORTRAN support" configuration : it is the same as above but with Fortran support. STEP III: Building the Libraries, tests and utilities. Note that the instructions are the same for both Options I and II. 1. Unpack Win32.nofortran.zip or Win32.zip in directory HDF41r5\. 2. Invoke Microsoft Visial C++ 6.0, go to "File" and select the "Open Workspace" option. Then open the c:\myHDFstuff\HDF41r5\all.dsw workspace. 3. Select "Build", then Select "Set Active Configuration". On Windows platform select as the active configuration "all -- Win32 Debug" to build debug versions of single-threaded static libraries, tests and utilities and multi-threaded libraries and tests. or "all -- Win32 Release" to build release versions of single-threaded static libraries, tests and utilities and multi-threaded libraries and tests. Select "Build" and "Build all.exe" to build the corresponding version of the HDF41r5 library. If you are building from the Win32.zip archive, you will see that the Digital Visual Fortran compiler is invoked by the Visual C++ Development environment in compiling the fortran code. NOTE: "all" is a dummy target. You will get a link error when "all.exe." is built : LINK: error LNK2001: unresolved external symbol _WinMainCRTStartup..... all.exe - 2 error(s), .... Warning messages can be ignored. The "all.exe" is never created, so it is OK. When the debug build is done the directories listed below will contain the following files: c:\MyHDFstuff\HDF41r5\Windows\bin\debug - utilities, statically linked with the single-threaded libraries. c:\MyHDFstuff\HDF41r5\Windows\lib\debug\singlethreaded - HD415d.lib - HDF static library (inludes JPEG and GZIP libraries) HM415d.lib - MFHDF static library c:\MyHDFstuff\HDF41r5\Windows\lib\debug\multithreaded - HD415md.lib - HDF multi-threaded DLL import library (inludes JPEG and GZIP libraries) HM415md.lib - MFHDF multi-threaded DLL import library c:\MyHDFstuff\HDF41r5\Windows\DLL\debug HD415md.DLL - HDF DLL HM415md.DLL - MFHDF DLL When the release build is done the directories listed below will contain the following files: c:\MyHDFstuff\HDF41r5\Windows\bin\release - utilities, statically linked with the single-threaded libraries. c:\MyHDFstuff\HDF41r5\Windows\lib\release\singlethreaded - HD415.lib - HDF static library (inludes JPEG and GZIP libraries) HM415.lib - MFHDF static library c:\MyHDFstuff\HDF41r5\Windows\lib\release\multithreaded - HD415m.lib - HDF multi-threaded DLL import library (inludes JPEG and GZIP libraries) HM415m.lib - MFHDF multi-threaded DLL import library c:\MyHDFstuff\HDF41r5\Windows\DLL\release HD415m.DLL - HDF DLL HM415m.DLL - MFHDF DLL Note: The ws2_32.lib needs to linked with your executable if using the static mfhdf library. The ws2_32.lib can be found in your Microsoft Visual C++ directory under the lib folder.