Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Helper script to compile HDF5 C++ applications

.

HTML Wrap
classhdf-rm-content-block
Hdf rm anchor
AnchorNamesyntax
Syntax:
HTML Wrap
classhdf-rm-section
HTML
<pre><code class="language-bash">h5c++ [OPTIONS] &lt;compile line&gt;</code></pre>

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

h5c++ can be used in much the same way MPIch is used to compile an HDF5 program. It takes care of specifying where the HDF5 header files and libraries are on the command line.

h5c++ supersedes all other compiler scripts in that if you've used one set of compiler scripts to compile the HDF5 C++ library, then h5c++ uses those same scripts. For example, when compiling an MPIch program, you use the mpiCC script.

Some programs use HDF5 in only a few modules. It isn't necessary to use h5c++ to compile those modules which don't use HDF5. In fact, since h5c++ is only a convenience script, you are still able to compile HDF5 C++ modules in the normal way. In that case, 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 h5c++ to compile the program hdf_prog, which consists of modules prog1.cpp and prog2.cpp and uses the HDF5 C++ library, would be as follows:

        # h5c++ -c prog1.cpp
        # h5c++ -c prog2.cpp
        # h5c++ -o hdf_prog prog1.o prog2.o

Hdf rm anchor
AnchorNameoptparms

Options and Parameters:
HTML Wrap
classhdf-rm-section
-helpPrints a help message.
-echoShow all the shell commands executed.
-prefix=DIRUse the directory DIR to find HDF5 lib/ and include/ subdirectories 
Default: prefix specified when configuring HDF5.
-showShow the commands without executing them.
-shlibCompile using shared HDF5 libraries. 
Default for HDF5 built without static libraries.
-noshlibCompile using static HDF5 libraries. 
Default for HDF5 built with static libraries.
<compile line>
                
The normal compile line options for your compiler. h5c++ uses the same compiler you used to compile HDF5. Check your compiler's manual for more information on which options are needed.

Hdf rm anchor
AnchorNameenvvars

Environment Variables:
HTML Wrap
classhdf-rm-section

When set, these environment variables override some of the built-in defaults of h5c++.

HDF5_CXXUse a different C++ compiler.
HDF5_CXXLINKERUse a different linker.
HDF5_USE_SHLIB=[yes|no]    Use shared version of the HDF5 library. 
Default: no, except when HDF5 built with only shared libraries.
HDF5_CPPFLAGSUse additional preprocessor flags.
HDF5_CXXFLAGSUse additional C++ compiler flags.
HDF5_LDFLAGSUse additional library paths.
HDF5_LIBSUse additional libraries.

The last four of these environment variables have corresponding variables with names ending in BASE that can also be set by editing their values in the "Things You Can Modify to Override HDF5 Library Build Components" section of the h5c++script.

Note that adding library paths to HDF5_LDFLAGS where another HDF5 version is located may link your program with that other HDF5 Library version.

Hdf rm anchor
AnchorNameexitstatus

Exit Status:
HTML Wrap
classhdf-rm-section
0Succeeded.
> 0    An error occurred.

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    

Command Line Tool

Change
1.8.12Tool modified to switch default to link to shared libraries when HDF5 configured with --disable-static.
1.8.6Four compiler flags and environment variables added.
1.8.5Tool exit status codes updated.
1.6.0Tool introduced in this release.