unresolved external symbol H5T_IEEE_F32BE_g

TL;DR: My link step finds most symbols, but none of these built-in type definitions (eg H5T_IEEE_F32BE_g)

Windows 10
HDF5 1.10.2
VC 2017, using command line

cl /LD /I"C:\Program Files\HDF_Group\HDF5\1.10.2\include" myhdf5.c "C:\Program Files\HDF_Group\HDF5\1.10.2\lib\hdf5.lib" /Femyhdf5.dll

myhdf5.obj : error LNK2019: unresolved external symbol H5T_IEEE_F32BE_g referenced in function create_dataset

I found [Windows: unresolved symbol _H5T_STD_I32LE_g] and added the define just before the include, but this did not solve the problem.

#define _HDF5USEDLL_
#include "hdf5.h"

Thanks in advance for any advice!


I believe you are trying to link dynamically, and this define is superseded:
#define HDF5USEDLL

Installing the binary should provide you with the “USING_HDF5_VS.txt” file in the "C:\Program Files\HDF_Group\HDF5\1.10.2\share folder. There should be the following text in the top section:

NOTE: Building applications with the dynamic/shared hdf5 libraries requires
that the “H5_BUILT_AS_DYNAMIC_LIB” compile definition be used.



I am experiencing the same issue. I compiled the HDF5 source using CMAKE script provided from the website.
I included the compiled binaries in VS2017 as instructed in the “USING_HDF5_VS.txt” file. I was able to compile an test application to create a hdf5 file, however when I try to add a dataset, i get the same error of unresolved external symbol H5T_IEEE_F32BE_g.

I see where the variable is defined in the H5Tpublic.h file. What could be causing this problem?

Any feedback would be greatly appreciated.