# Cannot convert from hid\_t to hdf5\_hid\_t &

**URL:** <https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245>\
**Category:** FESAPI\
**Created:** [December 11, 2024, 9:55am UTC](https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245 "2024-12-11T09:55:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mengli.uia](https://discourse.f2i-consulting.com/user_avatar/discourse.f2i-consulting.com/mengli.uia/32/126_2.png) [@mengli.uia](https://discourse.f2i-consulting.com/u/mengli.uia)\
**Post date:** [December 11, 2024, 9:55am UTC](https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245/1 "2024-12-11T09:55:00Z")

</div>

Hi, following the README instruction of Fesapi (V1.0.0.0), I managed to generate Fesapi.sln with CMake. But during the compilation of the solution, there are quite a few build errors as following:

1. a reference of type “hdf5\_hid\_t &” (not const-qualified) cannot be initialized with a value of type “hid\_t”
2. error C2664: ‘void common::AbstractHdfProxy::selectArrayNdOfValues(const std::string &,unsigned \_\_int64 \*,unsigned \_\_int64 \*,unsigned \_\_int64 \*,unsigned \_\_int64 \*,unsigned int,bool,hdf5\_hid\_t &,hdf5\_hid\_t &)’: cannot convert argument 8 from ‘hid\_t’ to ‘hdf5\_hid\_t &’
3. error C2511: ‘void common::HdfProxy::readArrayNdOfValues(const std::string &,void \*,hid\_t)’: overloaded member function not found in ‘common::HdfProxy’. It is inconsistent of arg type between .h calarification (hdf5\_hid\_t ) and .cpp implementation (hid\_t )?

- def in .h file: void readArrayNdOfValues(const std::string & datasetName, void\* values, hdf5\_hid\_t datatype);
- def in .cpp file: void HdfProxy::readArrayNdOfValues(const std::string & datasetName, void\* values, hid\_t datatype)

Appreciate very much for any proposal and solution (CMake setup or Visual studio setup) and the underneath logic of (hdf5\_hid\_t and hid\_t).

---

<div class="post-metadata">

**Author:** ![philippeVerney](https://discourse.f2i-consulting.com/user_avatar/discourse.f2i-consulting.com/philippeverney/32/29_2.png) [@philippeVerney](https://discourse.f2i-consulting.com/u/philippeVerney)\
**Post date:** [December 11, 2024, 11:08am UTC](https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245/2 "2024-12-11T11:08:06Z")

</div>

Hello,

At a first glance, it makes me thinking about an incorrect set of the HDF5\_1\_10 CMAKE variable as mentionned in the README, can you double check?

> give real values, path and files to the following cmake variables:
> 
> ```
> HDF5
> HDF5_1_10 : true if you link to a HDF5 library version 1.10. false (default) if you link to a HDF5 library version 1.8
> 
> ```

---

<div class="post-metadata">

**Author:** ![philippeVerney](https://discourse.f2i-consulting.com/user_avatar/discourse.f2i-consulting.com/philippeverney/32/29_2.png) [@philippeVerney](https://discourse.f2i-consulting.com/u/philippeVerney)\
**Post date:** [December 11, 2024, 11:17am UTC](https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245/3 "2024-12-11T11:17:50Z")

</div>

FYI [Error when compiling with HDF5 1.10 · Issue #76 · F2I-Consulting/fesapi · GitHub](https://github.com/F2I-Consulting/fesapi/issues/76)

---

<div class="post-metadata">

**Author:** ![mengli.uia](https://discourse.f2i-consulting.com/user_avatar/discourse.f2i-consulting.com/mengli.uia/32/126_2.png) [@mengli.uia](https://discourse.f2i-consulting.com/u/mengli.uia)\
**Post date:** [December 16, 2024, 7:55am UTC](https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245/4 "2024-12-16T07:55:42Z")

</div>

During the current upgrade, the required HDF5 library version is 1.12. And the next round of upgrade, the version would be 1.14. So I am wondering how to setup the variable in CMake.

---

<div class="post-metadata">

**Author:** ![philippeVerney](https://discourse.f2i-consulting.com/user_avatar/discourse.f2i-consulting.com/philippeverney/32/29_2.png) [@philippeVerney](https://discourse.f2i-consulting.com/u/philippeVerney)\
**Post date:** [December 20, 2024, 8:27am UTC](https://discourse.f2i-consulting.com/t/cannot-convert-from-hid-t-to-hdf5-hid-t/245/5 "2024-12-20T08:27:23Z")

</div>

[v2.0.0.0](https://github.com/F2I-Consulting/fesapi/releases/tag/v2.0.0.0) states

> - Add HDF5 1.12 support
> - Use HDF5 v1.10 (and superior versions) instead of 1.8 for default builds

[v2.9.0.0](https://github.com/F2I-Consulting/fesapi/releases/tag/v2.9.0.0) states

> - Fix HDF5 version detection by CMake

I guess you should be good from v2.9.0.0. Otherwise you might expect some tweaks to make it working if you are unlucky.
