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.