Unresolved external symbol _H5T_NATIVE_INT_g

I compiled the HDF5 source using CMAKE script provided from the website (x86 - VS2017).
As instructed in the “USING_HDF5_VS.txt” file, I included the compiled binaries in my VS2017 project. When I try to add a dataset, i get the error of unresolved external symbol H5T_IEEE_F32BE_g. All the other external functions are resolved without a problem, only this external variable cannot be resolved.

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

Any feedback would be greatly appreciated.

Regards,
Donny

1 Like

Hi
It sounds like a dllimport / dllexport issue to me. Try to define H5_BUILT_AS_DYNAMIC_LIB in your project (assuming you built dlls).
Sam

Hi,

Thank you for your reply. I will try what you suggested.

Regards,
Donny

Thank you to you and the OP. I had this same issue with Visual Studio 2022 and HDF 1.14.3. Adding H5_BUILT_AS_DYNAMIC_LIB specifically to both debug and release configurations worked. Add to

Project > Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor