I am using Microsoft Visual Studio 2008 (HDF5 v1.8.12) and I have problems with each function a H5std_string as argument.
This is even the case when I run the example file "create.cpp" https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/c++/examples/create.cpp
This gives me the error:
....\H5F.c line 1466 in H5Fcreate(): invalid file name
The error is fixed when I replace FILE_NAME
with FILE_NAME.c_str()
and DATASET_NAME
with DATASET_NAME.c_str()
Similarily I get an error when running:
H5::Attribute attr = group.openAttribute("type");
H5std_string attr_content;
attr.read(attr.getStrType(), attr_content);
however following code works
char buf[1024];
H5::Attribute attr = group.openAttribute("type");
attr.read(attr_date.getStrType(), buf);