HDF5 msi installer is not creating szip.lib and slib.lib


#1

Hi,
I have been trying to install HDF5 for windows (HDF5-1.12.1-win64.msi) and so far no success.
I can install the msi file without any error. When i try to run an example code from C++ Examples, the linker couldnt find the file ‘szip.lib’ and I am stuck here for a week.
I followed all the installation instructions in the file ‘USING_HDF5_VS.txt’
1. Platform - x64
2. Headers path given to “VC++ Directories -> Include Directories”
3. Library path to “VC++ Directories -> Library Directories”
4. given the Linker inputs for dynamic library : Linker -> Input -> Additional Dependencies : szip.lib; zlib.lib; hdf5.lib; hdf5_cpp.lib; - in the same order as given in the instructions.
5. Compile definition as “H5_BUILT_AS_DYNAMIC_LIB” in C/C++ -> Preprocessor -> Preprocessor Definitions
6. Tried to run in both Debug & Release modes

I am sure I didnt complete the installation fully as i couldnt find the szip.lib & zlib.lib files anywhere inside the installation folder.
I really need this HDF5 to be configures as I am comfortable building the application in Visual Studio and I want to integrate the visualisations in DirectX 12. And I am ok with support only for Windows.

Please suggest your inputs to configure it in Visual Studio.


#2

Maybe our docs need an update, but I don’t think you need those libs as they are statically linked into hdf5. Have you tried to build the examples project that is in the share or cmake folder under the installation point?

Allen


#3

Hi,
Thank you for the reply…
Yes, I tried to build the examples first… and I needed the dynamic linking. It was not detecting these 2 libraries.
So, I manually downloaded the packages of these 2 libraries & built it using cmake to create the .DLL file & copied the .DLL files to the right location.
Now it is working for the examples…
I am looking for the time series data storage through H5PT. But I was experiencing some errors as it was expecting a MACRO.
I will try & rectify first. If I stuck somewhere, I will take help from this forum.
Thank you…


#4

Still very strange that you need those libraries - I will need to dblchk our testing setup because it does not indicate that those libs are needed. We test on VS2015,VS2017 and VS2019 under a variety of configurations.
Did you try to remove those libs from the “Linker -> Input -> Additional Dependencies” - because I think you are forcing the issue?

Allen


#5

Hi,
Yes, I have tried several combinations. infact, I didnt even add the Additional Dependencies after my installation. I will detail it out here…
I have used VS2022 preview edition - 64 bit target platform
Windows 64 bit OS

HDF5 - MSI file --> installed it in C:\HDF (first time when I installed it, it was directly getting installed in Program Files. It was not working. And, I had a doubt that the spaces in the installation path might create problem. So, I eliminated that doubt also)
Config 1: Dynamic lib (all configurations mentioned in “USING_HDF5_VS.txt” has been maintained as i mentioned in my first comment.
After installation I tried the Create example to create a hdf5 file. It was asking for the szip.lib file. I checked it in the installed folder. it was not available.
Even i was not sure whether i have to build the file using cmake or makefiles. (I am a complete beginner)

Config 2: Static lib
I tried to run by replacing all dynamic library details with static configuration.
Same problem. it was still asking for szip.lib

Config 3: I downloaded the library files given in the website & built those lib files using cmake and copied those lib files in the lib filder in HDF5 installation folder.
It was a success.

So, I am not sure whether i have to build the files once I install using MSI for windows. - it was not clear from the docs.