Hello!
You can download pre-built binaries for WIndows from here: https://www.hdfgroup.org/downloads/hdf5/
You will need to log in to download the binaries. If you do not have an account, you can register by clicking on the blue-outlined button “Create Free Account” at the top right of the page.
You will find Windows binaries for Window7 and Windows 10 64-bit for VS 2015 in the table on that page:
hdf5-1.10.5-Std-win10_64-vs14.zip
hdf5-1.10.5-Std-win7_64-vs14.zip
If you have a different version of VS, you will need to build HDF5 from source. You can download the source code packaged for CMake (CMake-hdf5-1.10.5.zip) and follow the link for Building HDF5 with CMake. See: HDF5 1.10.5
Once you have obtained the binaries (and uncompressed and installed them), you can either use CMake or Visual Studio to compile your application.
In the top directory of the built binary distribution, you will see these files (among others):
bin/ - HDF5 utilities
include/ - HDF5 include files
lib/ - HDF5 libraries
USING_HDF5_VS.txt
…
The USING_HDF5_VS.txt file contains instructions for building an application with Visual Studio. The instructions may vary slightly depending on your version of Visual Studio, but basically you must do the following in VS:
- specify the H5_BUILT_AS_DYNAMIC_LIB compile definition if using shared libraries.
- add the path to the HDF5 include files to Include Directories.
- add the path to the HDF5 libraries to the Library Directories.
- specify the library names.
Then compile the application in VS.
If you wish to compile your application with CMake, the Building HDF5 with CMake page provides some instructions: Building HDF5 with CMake
Attached is a small program that reads a text file with values separated by commas, and creates an HDF5 file.
Hopefully, this helps you to get started! Feel free to contact me at the HDF Helpdesk if you have further questions: The HDF Help Desk
-Barbara
h5floatcs.c (2.0 KB)
floatcs.txt (252 Bytes)