gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

H5D_OPEN fails on windows, because of a (long) cast #1742

Open klimpel opened 7 months ago

klimpel commented 7 months ago

H5D_OPEN fails on windows, with the error message: "H5D_OPEN: Invalid arguments to routine". This can be reproduced with TEST_HDF5_BYTE_ARRAY from testsuite/test_hdf5.pro, for example.

The reason for that error is the (long) cast in hdf5_fun.cpp line 1457: hid_t h5d_id= H5Dopen((long)h5f_id, h5dDatasetname.c_str()); The problem is that "long" has only 32 bits on windows, but hid_t is 64bit (since hdf5 1.10).

The (long) cast was introduced on Jan 29, 2019 in correction of change in hid_t format (now 64b in hdf5 1.10, before 32b) (bug #537)