HDF5 - Visual Studio - Build in Release works, Debug fails

I’m building a legacy code in Fortran using Visual Studio 2017 (VS) and the Intel Fortran compiler. The code currently uses v1.6 of HDF5. The VS solution is a mishmash and has various mysterious options for the command line compiler and linker in either the Debug or Release modes.

Here’s the problem: I can compile and link the console application in Release mode, using dependencies to the szip.lib zlib.lib hdf5.lib hdf5_fortran.lib hdf5_hl.lib hdf5_hl_fortran.lib libraries. Everything works fine.

But when I switch to building in Debug mode and linking to the same libraries, the executable fails upon loading with an error about being unable to find “the procedure entry point HD5_SIZE_FLAGS”. Sure enough, DependencyWalker shows me the need for this function H5D_SIZE_FLAGS in the HDF5_fortran.dll in the Debug version. But it is NOT needed in the Release version.

There is no change in the Fortran code which is compiled in the Debug versus Release versions.

Does anybody have a hint as to why changing the build flags in Visual Studio would create this problem? And of course, I would be extremely grateful for a hint on how to fix the problem.

Many thanks
Lynn

v1.6 as I remeber was very dependent on the Visual Studio version at that time (VS6?) and Debug mode was very difficult to get right. Also the batch files were dependent on the VS project files as I recall. I wonder if there was an export file that maybe you could search for the H5D_SIZE_FLAGS entry and remove.

Allen

Ok, thanks very much for that feedback. I was afraid somebody was going to say that v1.6 was whacky, but I thought I’d throw my question out there before the end of the week.

I made a stab at your suggestion and ran into more bizarre behaviour. Hence I’ll try to use the latest version of the library and I’ll see where I get.

Best wishes,
Lynn