Entry Point Not Found in hdf5.dll

Hello, I am having trouble with running my program in Visual Studio 2017 under Windows 7.

I think I have already locate the reason for this trouble: One of the modules in my program can only use the older version of hdf5.dll (1.8.12) but the other module in my program can only use the latest version of hdf5.dll(1.10.5).

If I try to run it use the latest version of hdf5.dll . The error " Entry Point Not Found – The procedure entry point H5Rdereference could not be located in the dynamic link library hdf5.dll " will arise.

Otherwise, when I try to use the old version of hdf5.dll. There will have error as following:
Warning! HDF5 library version mismatched error:
The HDF5 header files used to compile this application do not match the version used by the HDF5 library to which this application is linked. Data corruption or segmentation faults may occur if the application continues. This can happen when an application was compiled by one version of HDF5 but linked with a different version of static or shared HDF5 library. You should recompile the application or check your shared library related settings such as ‘LD_LIBRARY_PATH’.
You can, at your own risk, disable this warning by setting the environment variable ‘HDF5_DISABLE_VERSION_CHECK’ to a value of ‘1’. Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.10.5, library is 1.8.12

Thanks for any suggestion for this issue!

I solved this problem based on previous similar discussion, just by setting the environment variable ‘HDF5_DISABLE_VERSION_CHECK’ to a value 1.

I am not very sure if this change will have potential risk in the program. I checked it out there was another way: that is to recompile the program use the same version of hdf5.dll but I am still not very clear about how to do that specifically. Could anyone can help me on the second way? thanks!