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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
|
HDF5 Build and Install Instructions for Windows 2000/NT/98.
----------------------------------------------------------
The instructions which follow assume that you will be using the
source code release 'zip' file (hdf5-1_4_2.zip).
***************************WARNINGS****************************
Please read CAREFULLY about Preconditions before you go to the
following sections
Preconditions
1. Installed MicroSoft Developer Studio,Visual C++ 6.0 and
WinZip.
2. Set up a directory structure to unpack the library.
For example:
c:\ (any drive)
MyHDFstuff\ (any folder name)
3. Run WinZip on hdf5-1_4_2.zip (the entire source tree) and
extract hdf5 package into c:\MyHDFstuff(or whatever drive
and folder name you would like to choose). This creates a
directory called 'hdf5xxx'under MyHDFstuff which contains
several files and directories. Rename directory "hdf5xxx"
into "hdf5".
4. HDF5 uses zlib for compression and zlib is distributed
with hdf5 lib. If you have your own version read section
VI about the zlib library.
5. You do need hdf4 (hdf and mfhdf) static and dll libraries
to generate hdf4-related tools.
6. Currently you can build and test either hdf5 libraries
and non-hdf4 related tools or hdf5 libraries and hdf4
related tools;but not BOTH.In other words,you may either
follow Section II or Section III but NOT both Sections to
build HDF5 libraries and related tools.
---------------------------------------------------------------
The following sections discuss installation procedures in detail:
Section I: What do we build and install
Section II: Building and testing hdf5 libraries and non-hdf4
related hdf5 tools
Section III: Building and testing hdf5 libraries and all hdf5
tools
Section IV: Building an application using the HDF5 library or
DLL
Section V: Some more helpful pointers
Section VI: ZLIB library - removing or changing the path
***************************************************************
Section I:
What do we 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 tool library:
debug and release version
HDF5 tool export library for DLL:
debug and release version
HDF5 tools:
non-hdf4 related tools and hdf4 related tools
HDF5 library testing programs:
hdf5 library related comprehensive tests
HDF5 related tools testing programs:
hdf5 tools testing programs
HDF5 examples:
simple HDF5 examples
**************************************************************
Section II:
Building and testing hdf5 libraries and non-hdf4 related tools
==================================================
STEP 1: Building hdf5 libraries and non-hdf4 related tools
1. Unpack all.zip in 'hdf5' and move the zlib.dll from
c:\myHDFstuff\hdf5\src\zlib\dll to the Windows system
directory.
The system directory can usually be found under the path
C:\WINNT\system or C:\WINDOWS\system
2. Invoke Microsoft Visual C++, go to "File" and select
the "Open Workspace" option.
Then open the c:\myHDFstuff\hdf5\proj\all\all.dsw
workspace.
3. If you don't want to build and test backward
compatibility with hdf5 1.2, you may skip this part and
go to part 4.
To build and test backward compatibility with hdf5 1.2,
a) go to "Project" and select "Settings"
b) A window called "Project Settings" should be
popped up,on the upper-left corner is a small box
"Settings For". Set the option to
"Win32 Release".
c) Go to the the right side of "Project Settings"
window,choose C/C++ on the menu.
d) Go to the "Category" box below menu bar, choose
Preprocessor.
e) Go to "Preprocessor definitions" box below
"Category". Inside the box, type
"WANT_H5_V1_2_COMPAT". Note: don't type double
quote for "WANT_H5_V1_2_COMPAT" and add a comma
between "WANT_H5_V1_2_COMPAT" and the last
preprocessor definations(WIN32).
f) click OK at the bottom of "Project Settings"
window.
g) repeat a)-f) and choose the option as
"win32 Debug" on step b).
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, Debug multithreaded
DLLs and tests.
or
"all -- Win32 Release" to build release versions of
single-threaded static libraries, multithreaded DLLs
and tests.
NOTE : "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), ....
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 -
hdf5ddll.dll- the hdf5 library
hdf5ddll.lib- the dll export library
c:\MyHDFstuff\hdf5\proj\hdf5dll\release -
hdf5dll.dll- the hdf5 library
hdf5dll.lib- the dll export library
c:\MyHDFstuff\hdf5\test\"test directory"-
where test directory is one of the following:
big(dll)
bittests(dll)
chunk(dll)
cmpd_dset(dll)
dsets(dll)
dtypes(dll)
enum(dll)
extend(dll)
external(dll)
fillval(dll)
flush1(dll)
flush2(dll)
gheap(dll)
hyperslab(dll)
iopipe(dll)
istore(dll)
links(dll)
mount(dll)
mtime(dll)
ohdr(dll)
overhead(dll)
stab(dll)
testhdf5(dll)
unlink(dll)
c:\MyHDFstuff\hdf5\tools\toolslib\debug
c:\MyHDFstuff\hdf5\tools\toolslib\release
toolslib.lib- the tools library
c:\MyHDFstuff\hdf5\tools\toolslibD\debug
c:\MyHDFstuff\hdf5\tools\toolslibD\release
toolslibD.lib- the dll export library
c:\MyHDFstuff\hdf5\tools\"tools directory"-
where non-hdf4 related tools directory is one of the
following:
h5dump(dll)
h5ls(dll)
h5debug(dll)
h5import(dll)
h5repart(dll)
Test and tool directory contains debug and release
subdirectories with the corresponding tests and tools.
STEP 2: testing hdf5 libraries and non-hdf4 related tools
In a command prompt window run the test batch file which resides in
the hdf5\test directory(for example: C:\MyHDFstuff\hdf5\test)to make
sure that the library was built correctly.
You can possibily test four versions of hdf5 library and tools. They are:
release version
release dll version
debug version
debug dll version
NOTE: The hdf5ddll.dll and hdf5dll.dll should be placed into
the C:\WINNT\system or C:\WINDOWS\system directory before using the dlls.
We strongly suggest you to redirect your testing results into
an output file and you can easily check the testing results.
You may use either NotePad or NoteTab Light or whatever other
windows tools to check the results. For the purpose of printing,
please choose font less than 14 for better alignment of the text.
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 notetab light to check results. You should
not find any FAILED marks in your output files.
Note: big test is currently not working for windows, we are
still investigating this.
2. hdf5 tools testing
Currently we are only supporting h5dump test. We are
investigating h5ls test now.
1) h5dump test
cd back into hdf5 directory and then cd into tools
directory(...\hdf5\tools)
Go to a) b) c) or d) to test your chosen version
a) release static version
type:
dumptest release >"Your output filename"
b) release dll version
type:
dumptest release dll > "Your output filename"
c) debug static version
type:
dumptest debug >"Your output filename"
d) debug dll version
type:
dumptest debug dll >"Your output filename"
We are using "fc" command to compare whether dumper
generates correct results. Supposedly you should find
"FC: no differences encountered" in your output file.
However, since we are comparing the actual dumper output
with the expected dumper output under different directory,
you may see something like:
"
***** ..\TESTFILES\tall-1.ddl
#############################
Expected output for 'h5dump tall.h5'
#############################
HDF5 "tall.h5" {
GROUP "/" {
***** TALL-1.RESULTS
HDF5 "..\..\testfiles\tall.h5" {
GROUP "/" {
*****
"
The actual dumper output is correct. The difference showing
here is the different representations of filename of the same
file.
STEP 3: BUILDING THE 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".
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.
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(C:\MyHDFSTUFF\hdf5).
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. Especially writetest.exe and extendwritetest.exe
should be executed before chunkread.exe and readtest.exe
due to dependencies among these files.
**************************************************************
Section III: BUILDING AND TESTING HDF5 LIBRARIES AND ALL HDF5 TOOLS
------------------WARNINGS---------------------------------
1. This section is specifically for building HDF5 tools that needs to call HDF4 library.
Currently we are supporting two hdf4-relatedtools: H4toh5 converter
and H5toh4 converter. If you are not using these tools, please go
back to Section II for building and installing information.
2. This section builds and tests all versions of hdf5 libraries,
testing programs and tools covered in section II.
Additionally, it also builds and tests hdf4-related tools. We may refer some duplicated parts of this section to section II.
3. In case
a) you don't install hdf libraries and related tools in
your machine,
b) or if the top directory of your hdf4 libraries and
tools are not under C:\hdf41r4 and you are not familar
on how to change settings of VC++ projects.
you may get binary distribution from
ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF4.1r4/windows_precompiled_code/HDF41r4.zip
and use Winzip to unpack HDF41r4.zip into C:\hdf41r4.
4. We assume that you've installed hdf4(mfhdf and hdf)
libraries into drive C. The top level path should be
C:\HDF41r4. Under C:\HDF41r4 it should at least
include the following six directories:
C:\HDF41r4\bin where hdf4 utilities are stored
C:\HDF41r4\dlllib where release dll versions of hdf and mfhdf
libraries and export libraries of dlls are stored
C:\HDF41r4\dlllibdbg where debug dll versions of hdf and mfhdf
libraries and export libraries of dlls are stored
C:\HDF41r4\lib where release versions of hdf and mfhdf
libraries are stored
C:\HDF41r4\libdbg where debug versions of hdf and mfhdf
libraries are stored
C:\HDF41r4\include where header files are included
Make sure that you copy all *.dll files under C:\HDF41r4 into Windows
system directory before the next step.
If your path of hdf libraries and mfhdf libraries is different
from the default assumption, please DO follow No.4 of Step 1 on
the following:
Step 1.
1. Unpack all_withhdf4.zip in 'hdf5' and move the zlib.dll
from c:\myHDFstuff\hdf5\src\zlib\dll to the Windows
system directory.
The system directory can usually be found under the path
C:\WINNT\system or C:\WIN98\system
2. Invoke Microsoft Visual C++, go to "File" and select the
"Open Workspace" option.
Then open the c:\myHDFstuff\hdf5\proj\all\all.dsw
workspace.
3. If you don't want to build and test backward
compatibility with hdf5 1.2, you may skip this part and
go to part 4.
To build and test backward compatibility with hdf5 1.2,
a) go to "Project" and select "Settings"
b) A window called "Project Settings" should be
popped up,on the upper-left corner is a small box
"Settings For" Choose the option to
"Win32 Release".
c) Go to the the right side of "Project Settings"
window, choose C/C++ on the menu.
d) Go to the "Category" box below menu bar, choose
Preprocessor.
e) Go to "Preprocessor definitions" box below
"Category". Inside the box, type
"WANT_H5_V1_2_COMPAT". Note: don't type
double quote for "WANT_H5_V1_2_COMPAT" and add a
comma between "WANT_H5_V1_2_COMPAT" and the last
preprocessor defination(WIN32).
f) click OK at the bottom of "Project Settings"
window.
g) repeat a)-f) and set the option to "win32 Debug"
on step b).
4. This part is for users who are familar with handling
settings of VC++ project and store their hdf4 libraries
not under C:\hdf41r4. Other users can skip this part.
4.1 Change the path where hdf4 library header files are
located
a) On the View menu, click Workspace, you may see a
pop-up window with names of projects in all.dsw.
b) click FileView on the bottom of this window if you
are not seeing "all files big files ......."
c) You need to modify settings of four projects: h4toh5,
h4toh5dll,h5toh4 and h5toh4dll.
You also need to modify both debug and release
versions.
You may do as follows:
c1)Right click the selected project and then click
"Settings"
c2)A dialog box called "Project Settings" will be
poped up
c3)On the upper-left part of the "Project Settings"
box, you may find a small window "Settings for".
Make sure inside this "Settings for" box is either
"Win32 Debug" or "Win32 Release". Change contents
into "Win32 Debug" or "Win32 Release" otherwise.
Remember the version(Win32 Release or Debug) you
chose.
c4)On the upper-right menu of the "Project Settings"
window, find C/C++ and click it.
c5)Just below the upper-right menu, find a small
window called category, make sure that
"Preprocessor" appear in this window.
c6)In the middle of "Project Settings" windows, you
may find a box called
"Additional include directories:" . You may notice
"C:\hdf41r4\include" inside this box. This is the
path where the default hdf4 header files is
included. Replace only this path
(C:\hdf41r4\include) with your own path that
includes your hdf4 header files. Don't touch any
other paths.
c7)After you've done this, click OK at the bottom of
"Project Settings" window.
c8)Repeat c1)-c7)but change contents of "settings
for" in c3) from "Win32 Release" to "Win32 Debug"
or vice versa.
d) repeat step c) for the other three projects.
4.2 Replace the user's hdf and mfhdf libraries, export
libraries of hdf and mfhdf DLLs
You also need to modify four projects: h4toh5,
h4toh5dll, h5toh4 and h5toh4dll:
a) select project h4toh5 following instruction 4.1 a)
and b).
b) click h4toh5, you may find four libraries:
hm414d.lib,hd414d.lib and hm414.lib,hd414.lib
attached under the project h4toh5. hm414d.lib and
hd414d.lib are debug versions of mfhdf and hdf
libraries. hm414.lib and hd414.lib are release
versions of mfhdf and hdf libraries.
c) select these four libraries; go back to Edit menu and
choose "delete" option to delete template of these
libraries.
d) select project h4toh5 and right click the mouse, find
"Add Files to Projects", follow the instructions on
the pop-up box, to insert your own hm414d.lib,
hd414d.lib,hm414.lib and hd414.lib. You must know
their paths at first.
e) select project h4toh5dll following instruction 4.1 a)
and b).
f) click h4toh5dll, you may also find four libraries:
hd414m.lib,hd414md.lib and hm414m.lib,hd414m.lib
attached under the project h4toh5dll. These libraries
are debug and release versions of Export libraries of
mfhdf and hdf DLLs.
g) select these four libraries; go back to Edit menu and
choose "delete" option to delete template of these
libraries.
h) select project h4toh5dll and right click the mouse,
find "Add Files to Projects", follow the instructions
on the pop-up box, to insert your own hd414m.lib,
hd414md.lib,hm414m.lib and hd414m.lib. You must know
their paths at first.
i) repeat a)-h) for h5toh4 and h5toh4dll.
5. Select "Build", then Select "Set Active Configuration".
On Windows platform select as the active configuration
"all -- Win32 Debug" to build debug versions
single-threaded static libraries,
and tests.
or
"all -- Win32 Release" to build release versions of
single-threaded static
libraries, and tests.
NOTE : "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), ....
Warning messages can be ignored. The "all.exe" is never
created, so it is OK.
You should see hdf5 libraries, tests and tools under
section II Step 1.
In addtion, under c:\MyHDFstuff\hdf5\tools\
You may also find:
h4toh5
h5toh4
h4toh5dll
h5toh4dll
for both the debug and release versions.
STEP 2: testing hdf5 libraries and all hdf5 tools
1. hdf5 library testing
Follow all instructions of the same part in Section II
STEP 2
2. non-hdf4 related tools testing
Follow all instructions of the same part in Section II
STEP 2
3. hdf4-related tools testing
1) h4toh5 converter tool testing
First cd into hdf5\tools
Go to a) b) c) or d) to test your chosen version
a) release static version
type:
h4toh5testrun release >"Your output filename"
b) release dll version
type:
h4toh5testrun release dll > "Your output filename"
c) debug static version
type:
h4toh5testrun debug >"Your output filename"
d) debug dll version
type:
h4toh5testrun debug dll >"Your output filename"
We are using "fc" command to compare whether h4toh5
converter converts the hdf4 file into the correct hdf5
file.In your output files, Please only pay attention to
those lines which start with
"FC:",you should find "FC: no differences encountered"
for all tested hdf4 files in your output.
2) h5toh4 converter tool testing
To test the h5toh4 utility, you need to have hdf4
dumper utility "hdp" in your system.
Note: Currently h5toh4 release dll doesn't work
for all test cases possibly due to windows dealing
with "free memory" conventions for dll versions.
1) If your hdp utility is located at C:\hdf41r4\bin,
you may skip this part. Otherwise, copy your hdp.exe
file into the directory where your hdf5 tools are
located. For example, if your hdf5 tools directory is
C:\myHDFstuff\hdf5\tools; please copy hdp.exe into
this directory.
2) cd into \...\hdf5\tools.
Go to a) b) c) or d) to test your chosen version
a) release static version
type:
h5toh4testrun release >"Your output filename"
b) release dll version
type:
h5toh4testrun release dll > "Your output filename"
c) debug static version
type:
h5toh4testrun debug >"Your output filename"
d) debug dll version
type:
h5toh4testrun debug dll >"Your output filename"
We are using "fc" command to compare whether h5toh4
converter converts the hdf5 file into the correct hdf4
file.In your output files, Please only pay attention to
those lines which start with
"FC:",you should find "FC: no differences encountered"
for all tested hdf4 files in your output.
Warnings appear on the prompt when testing h5toh4 converter
can be ignored.
STEP 3: BUILDING THE EXAMPLES
Follow all instructions of SECTION II STEP 3.
Section IV:
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 or hdf5ddll.lib for
debug version.
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 V:
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_2.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
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 definations
Section VI:
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 and
H5pubconf.h files from the src directory and remove 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.
|