h5cc
[
OPTIONS ]
compile_line
h5pcc
[
OPTIONS ]
compile_line
h5cc
and h5pcc
can be used in much
the same way as mpicc
by MPICH is used to compile
an HDF5 program.
These tools take care of specifying on the command line
the locations of the HDF5 header files and libraries.
h5cc
is for use in serial computing environments;
h5pcc
is for parallel environments.
h5cc
and h5pcc
subsume all other
compiler scripts in that if you have used a set of scripts to compile
the HDF5 library, then h5cc
and h5pcc
also use those scripts.
For example, when compiling an MPICH program, you use the
mpicc
script.
If you have built HDF5 using MPICH, then h5cc
uses the MPICH program for compilation.
Some programs use HDF5 in only a few modules.
It is not necessary to use h5cc
or h5pcc
to compile those modules which do not use HDF5.
In fact, since h5cc
and h5pcc
are only
convenience scripts, you can still compile HDF5 modules in the
normal manner, though you will have to specify the HDF5 libraries
and include paths yourself.
Use the -show
option to see the details.
An example of how to use h5cc
to compile the program
hdf_prog
, which consists of the modules
prog1.c
and prog2.c
and uses the HDF5
shared library, would be as follows.
h5pcc
is used in an identical manner.
# h5cc -c prog1.c # h5cc -c prog2.c # h5cc -shlib -o hdf_prog prog1.o prog2.o
-help
-echo
-prefix=DIR
DIR
to find the HDF5
lib/
and include/
subdirectories.
-show
-shlib
-noshlib
h5cc
and h5pcc
use the
same compiler you used to compile HDF5;
check your compiler's manual for more information
on which options are needed.
h5cc
and h5pcc
defaults.
HDF5_CC
HDF5_CLINKER
HDF5_USE_SHLIB=[yes|no]