
Then HDF5 needs two dependency libraries.

HDF5: library to manage complex dataset of “all size”.ĭownload and extract HDF5 library 1.6.9 (avoid the latest release) then go inside the folder./configure For linker related options refer to the relevant Microsoft documentation.Ĭall h5fopen_f('myhdffile.GADGET-2 simulation requires some libraries in order to work. The description for relevant compiler command line options also describing the equivalent project property ( e.g. The documentation for the Intel Fortran compiler contains further information on how to use the compiler from within Visual Studio. The additional libraries to be specified will depend on the HDF5 features that you are using and whether you are doing a debug or release build (these properties need to be specified for each build configuration), but might be something like "szip.lib zlib.lib hdf5.lib hdf5_fortran.lib hdf5_hl_fortran.lib hdf5_hl.lib" You will also need to specify the location and names of the relevant HDF5 libraries in the project properties under Linker > General > Additional Library Directories and Linker > Input > Additional Dependencies. Within Visual Studio, the place to specify where to search for Fortran modules for a project is under the project Configuration Property (right click on the project name in the solution explorer and select Properties) Fortran > General > Additional Include Directories. Library files: szip.lib zlib.lib libhdf5.lib libhdf5_fortran.lib libhdf5_f90cstub.libĬall h5fopen_f('myhdffile.hdf5'C,H5F_ACC_RDONLY_F,hFile,ErrorFlag)Ĭall h5gopen_f(hFile, rootname, root_id, ErrorFlag)

Linker: C:\Program Files\HDF_Group\HDF5\1.12.0\lib In my case they were:Ĭompiler: C:\Program Files\HDF_Group\HDF5\1.12.0\include\static It also says the installation needs to match the version of Visual Studio but only mention VS2010 and above so I did not have much confidence.įor other users: you need to figure out whether you want static libraries or not and then find the paths to the directories where the hdf installation has put the relevant. The guidance given by the hdf group in USING_HDF5_VS.txt which comes with the installation says more or less the same but not as clearly. I had just managed to do what you suggest and it looks like it is working.
