summaryrefslogtreecommitdiffstats
path: root/INSTALL_Windows.txt
blob: 6b556830100a363868f158c38b08d7ae8c665141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
HDF5 Install Instructions for Windows NT/95/98.
-------------------------------------------------------------------------

The instructions which follow assume that you will be using the the source
code release 'zip' file (hdf5-1_4_0.zip).

The following sections discuss in detail installation procedures. 

  Section 1: Building from Source Code Release
  Section 2: Building an application using the HDF5 library or DLL
  Section 3: Some more helpful pointers
  Section 4: ZLIB library - removing or changing the path

Section 1:
Building from Source Code Release (hdf5-1_4_0.zip)
==================================================

STEP I:  Preconditions

To build the HDF5 and tests, it is assumed that you have done the following:

    1. Installed MicroSoft Developer Studio, and Visual C++ 6.0.

    2. Set up a directory structure to unpack the library. For example:

	    c:\					(any drive)
	   MyHDFstuff\				(any folder name)

    3. Copied the source distribution archive to that directory and
       unpacked it using the appropriate archiver options to create a
       directory hierarchy.

       Run WinZip on hdf5-1_4_0.zip (the entire source tree). This
       creates a directory called 'hdf5' which contains several files and
       directories.

    4. You do not have a version of the zlib library and you would like
       to use it. If you do not want to use the zlib library or have your
       own version read the section about the zlib library.


    5. You do need hdf4 (hdf and mfhdf) static and dll libraries to generate 
       h4toh5 and h5toh4 converter tool.

STEP II: Building the Libraries and tests.

    1. Rename the directory under C:\myHDFstuff\ from hdf5xxx to hdf5.

    2. Unpack all.zip in 'hdf5' and move the zlib.dll from
       c:\myHDFstuff\hdf5\src\zlib\dll to the Windows system directory.

       NOTE TO ALPHA USERS- the version of zlib that is packaged in
       all.zip is for Intel platforms. The Alpha versions of the
       libraries can be obtained from ftp://hdf.ncsa.uiuc.edu/HDF5/. The
       file to download is Alphazlib.zip. After the file is downloaded
       replace the src\zlib directory with the files from Alphazlib.zip.

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

       Then open the c:\myHDFstuff\hdf5\proj\all\all.dsw workspace. 

    4. 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, and
				tests. 
                or

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

       On the Alpha platform select as the active configuration

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

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

       Select "Build" and "Build all.exe" to build the corresponding
       version of the HDF5 library.

       NOTE 1: "all" is a dummy target. You will get a link error when
       "all.exe." is built:

             LINK: error LNK2001: unresolved external symbol
			_mainCRTStartup.....
             all.exe - 2 error(s), ....

  
       NOTE 2: In the HDF5_1.4 beta release, you may find strange errors
       when compiling tvlstr.c at testhdf5 and testhdf5dll projects. 
       Simply selecting tvlstr.c itself and compiling it separately, 
       you may find tvlstr.c be compiled successfully this time.
       Now coming back to Build menu and choose Build all.exe(or choose F7 key);
       The rest of testhdf5 program will be linked successfully. We suggest users to
       use batch build to avoid this annoying compiling behavior.    

       NOTE 3: In order to test h4toh5 and h5toh4 converter, you need to have
       hdf413(or higher version) library. Please adjust processor settings to include
       hdf4 header files and adjust the hdf4 library path in your own machine. One way
       to include library is to select the current project(h4toh5 etc.) and insert
       hdf4 libraries into the current project. Make sure that you find all hdf4 library
       files following the hdf4 library templates of the current project.

       Warning messages can be ignored. The "all.exe" is never created,
       so it is OK.

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

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

                  hdf5.lib- the hdf5 library

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

                  hdf5.dll- the hdf5 library
                  hdf5.lib- the dll export library

            c:\MyHDFstuff\hdf5\test\"test directory"-
            where test directory is one of the following:

			big

			bittests

			chunk

			cmpd_dset

			dsets

			dtypes
			
			enum

			extend

			external

			fillval

			flush1

			flush2

			gheap

			hyperslab

			iopipe

			istore

			links

			mount 

			mtime

			ohdr

			overhead

			ragged 

			stab

			testhdf5 

			unlink 

Each test directory contains debug and release subdirectories with the 
corresponding tests.
		

STEP III:   TESTING THE BUILD

In a command prompt window run the test batch file which resides in the
hdf5\test directory to make sure that the library was built correctly.

To test, cd into the hdf5\test directory. Then type: "hdf5test [debug or
release] [dll]" depending on which version you would like to test.

To use the timing tests use the hdf5timingtest.bat file found in the
hdf5\test directory. Type: "hdf5timingtest [debug or release] [dll]"
depending on which version you would like to test.

To test the h5dump utility, cd into hdf5\tools. Then type: "dumptest
[debug or release] [dll]" depending on which version you would like to
test. We are using "fc" command to compare whether dumper generates 
correct results.We recommend you to redirect(using ">") 
the output into a file to check the test output manually.

To test the h4toh5 utility,  cd into hdf5\tools. 
Then type: "h4toh5testrun [debug or release] [dll]" depending on which 
version you would like to test. We are using "fc" command to compare 
whether converter converts correctly. We recommend you to redirect (using ">")
the output into a file to check the test output manually.
                                                                                                   To test the h5toh4 utility, you need to have "hdp" utilityin your system.
cd into hdf5\tools. Four parameters should be input in this format:

1) For windows NT 4.0 and 5.0 
type h5toh4testrun [para 1] [para 2] [para 3] [para 4] 
2) For Windows 98
type h5toh4testwin98 [para 1] [para 2] [para 3] [para 4]

  para1: [Debug] or [Release] version you are testing.
  para2: The top directory path(including the drive name) where hdf5 tools 
         is located,for example: D:/h5_1.4 
  para3: The full path where hdp is located, for example D:/H414/bin 
  para4: If no dll version,leave this parameter empty or type DLL

***** Warnings:*******
      Do make sure that you type the correct parameters according to the
      correct orders. Para 2 and Para 3 should be correctly input. Otherwise,
      the result may be unpredictable.

NOTE: The appropriate dll should be placed in the Windows\system
      directory before using the dlls.

NOTE: The debug dll tests on the Alpha platform currently are not
      completely working. The release dll is fine though.


STEP IV: BUILDING THE EXAMPLES

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

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

       On Windows platform select as the active configuration

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

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

       On Alpha platform select as the active configuration

	   "allexamples -- Win32 AlphaDbg" to build debug versions of the
                           examples. 
            
                or
	
	   "allexamples -- Win32 AlphaRel" to build release versions the           
                           examples.

       Select "Build" and "Build allexamples.exe" to build the
       corresponding version of the examples.

       When the debug build or release build is done there should be
       the following subdirectories in C:\myHDFstuff\hdf5\examples\

			attributetest
 
			chunkread

			compoundtest 

			extendwritetest 

			grouptest 

			readtest 

			selecttest 

			writetest 



    3. Run the batch file "InstallExamples.bat" which resides in the
       top level directory. This file creates 2 new directories,
       examplesREL and examplesDBG, in the 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. The
       examples should be tested in these 2 new directories due to some
       dependencies between the examples.



Section 2:  
BUILDING AN APPLICATION USING THE HDF5 LIBRARY OR DLL- SOME HELPFUL POINTERS
============================================================================

If you are building an application that uses the HDF5 library the
following locations will need to be specified for locating header files
and linking in the HDF libraries:

            <top-level HDF5 directory>\src

where <top-level HDF5 directory> may be 

            C:\MyHDFstuff\hdf5\


To specify this location in the settings for your VC++ project:

    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. Chose the build configuration you would like to modify in the
       drop down menu labeled with 'Settings For:'

    4. Chose the C/C++ tab

    5. At the bottom of the window, there should be a text-area labeled
       with 'Project Options:'. In this text-area, scroll until you
       reach the end and type /I "<top-level HDF5 directory>\src" and
       then click OK.

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.


To use the DLL:

    1. Follow the steps for specifing 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.

    3. Place the DLL in a location that Windows will be able to locate it.
       The search 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. 


Section 3:
MORE 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: 
       
    The files in all.zip must end up in the hdf5\ directory installed by
    hdf5-1_4_0.zip

    If you must install all.dsw and all.dsp in another directory,
    relative to hdf5\ , 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
		     PreProcessor
			 Code Generation
			    Use run-time Library
				   These are all set to use 
                                      Single-Threaded


Section 4:
ZLIB LIBRARY- REMOVING OR CHANGING THE PATH
============================================

If you would like to remove the zlib library from the hdf5 library or use
your own version of the zlib library then follow the steps below.

Removing the zlib library completely:

    Open the all.dsw workspace file in Microsoft Visual C++. Go to the
    hdf5 project. Select the zlib.lib file from this project and
    delete(press the 'delete' key) it. Next open the H5config.h file
    from the src directory. Remove the the following two lines:

		#define HAVE_LIBZ 1
		#define HAVE_COMPRESS2

    then save the file.
	
    Next go to the hdf5dll project. Remove the zlib.lib from this project
    too. Open the project settings for the hdf5dll project. Go to the
    C/C++ settings tab and under the preprocessor definitions remove the
    ZLIB_DLL in both the debug and the release settings. Recompile the
    all project and then save the workspace.


Replacing the zlib library:

    Open the all.dsw workspace and go to the hdf5 project. Delete the
    zlib.lib file from the file listing. Then select the hdf5 project
    and richt click to get a menu. Pick the "add files to project..."
    option and find the version of the zlib that you would like to use.
    Then click OK in the file chooser dialog. Repeat the steps for the
    hdf5dll project. You may also want to replace the zlib.h and zconf.h
    files which are in the src directory with your own versions of these
    files. Then recompile the all project.