h5cc(1)
π h5cc β the compile-bestie you didn't know you needed
okay so first things first: this is h5cc, living in the General Commands Manual, section 1 (the one for user commands, iykyk). She's a helper script and her whole job is making HDF5 apps actually compile without you crying. π«Ά
β¨ NAME β¨
h5cc β Helper script to compile HDF5 applications. π
πΈ SYNOPSIS πΈ
h5cc [OPTIONS] <compile line>
that's it. that's the whole vibe. π
π¦ DESCRIPTION π¦
So bestie, think of h5cc like MPIch but for compiling an HDF5 program. She handles telling your compiler where the HDF5 header files and libraries are, so you don't have to type out a whole novel of paths on the command line. She just does it. main character energy, honestly. β¨
Not me about to tell you the most iconic part: h5cc supercedes all other compiler scripts. Like, if you used other scripts to compile the HDF5 library, h5cc uses those scripts too. Example time: when you're compiling an MPIch program you'd normally use the mpicc script. And if you built HDF5 using MPIch? Then h5cc uses the MPIch program for compilation. She's not replacing them, she's networking. π
Also lowkey important: some programs only use HDF5 in a few modules, and it is not necessary to use h5cc to compile the modules that don't use HDF5. And fr fr, since h5cc is only a convenience script, you can absolutely still compile HDF5 modules the normal way. Just know that in that case, you will have to specify the HDF5 libraries and include paths yourself. no hand-holding, bestie. π
Okay now the glow-up example. Say you wanna compile the program hdf_prog, which is made of the modules prog1.c and prog2.c, and it uses the HDF5 shared library. Here's how:
# h5cc -c prog1.c # h5cc -c prog2.c # h5cc -shlib -o hdf_prog prog1.o prog2.o
slay. compile, compile, link. π
π OPTIONS π
-helpβ Prints a help message. (she's helpful AND pretty πΈ)-echoβ Show all the shell commands executed. so you can see exactly what she's doing behind the scenes. π-prefix=DIRβ Use the directory DIR to find the HDF5lib/andinclude/subdirectories. Default: the prefix specified when configuring HDF5. π-showβ Show the commands without executing them. peek but don't touch. π-shlibβ Compile using shared HDF5 libraries. π«Ά-noshlibβ Compile using static HDF5 libraries [default]. the default! don't forget it! β<compile line>β The normal compile line options for your compiler.h5ccuses the same compiler you used to compile HDF5. Check your compiler's manual for more info on which options are needed. π
π ENVIRONMENT π
HDF5_CCβ Use a different C compiler. go off, switch it up. π₯HDF5_CLINKERβ Use a different linker. link differently, bestie. πHDF5_USE_SHLIB=[yes|no]β Use shared version of the HDF5 library [default: no]. β
π SEE ALSO π
go say hi to her siblings, they're iconic too. π§
π reminder that h5cc is a convenience script and nothing more β if you skip her, the libraries and include paths are your problem, not hers. no cap.
and that's the whole page, bestie!! this was the h5cc(1) manual page from the General Commands Manual, and it's officially a wrap. π stay compiling, stay hydrated, and may your linker never betray you. mwah. πβ¨
π¦ where this page comes from
- debian bookworm: hdf5-helpers 1.10.8+repack1-1 Β· BSD-3-Clause
- debian trixie: hdf5-helpers 1.14.5+repack-3 Β· BSD-3-Clause
- epel 10: hdf5-devel 1.14.5-1.el10_0 Β· BSD-3-Clause
- epel 9: hdf5-devel 1.12.1-7.el9.1 Β· BSD
- fedora 43: hdf5-devel 1.14.6-6.fc43 Β· BSD-3-Clause
- fedora 43: hdf5-devel 1.14.6-6.fc43 Β· BSD-3-Clause
- fedora 44: hdf5-devel 1.14.6-7.fc44 Β· BSD-3-Clause
- fedora 44: hdf5-devel 1.14.6-7.fc44 Β· BSD-3-Clause
- ubuntu jammy: hdf5-helpers 1.10.7+repack-4ubuntu2 Β· BSD-3-Clause
- ubuntu noble: hdf5-helpers 1.10.10+repack-3.1ubuntu4 Β· BSD-3-Clause
- ubuntu questing: hdf5-helpers 1.14.5+repack-3build1
- ubuntu resolute: hdf5-helpers 1.14.6+repack-2 Β· BSD-3-Clause
- ubuntu stonking: hdf5-helpers 2.2.0+repack-5 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms