I am trying to run an example code given [here] (https://raw.githubusercontent.com/HDFGroup/hdf5/develop/c++/examples/h5tutr_crtdat.cpp) using VS code 2022.
- I have installed hdf5-1.14.3-Std-win10_64-vs17.
- Have added the include and lib path to VS code additional include and library path.
- Then added hdf5.lib and hdf5_Cpp.lib to additional dependencies.
- Under C/C++ → preprocessor definitions have added H5_BUILT_AS_DYNAMIC_LIB
The program builds successfully. When I run the code it shows error
HDF5-DIAG: Error detected in HDF5 (1.14.3) thread 0:
#000: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5F.c line 660 in H5Fcreate(): unable to synchronously create file
major: File accessibility
minor: Unable to create file
#001: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5F.c line 614 in H5F__create_api_common(): unable to create file
major: File accessibility
minor: Unable to open file
#002: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5VLcallback.c line 3605 in H5VL_file_create(): file create failed
major: Virtual Object Layer
minor: Unable to create file
#003: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5VLcallback.c line 3571 in H5VL__file_create(): file create failed
major: Virtual Object Layer
minor: Unable to create file
#004: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5VLnative_file.c line 94 in H5VL__native_file_create(): unable to create file
major: File accessibility
minor: Unable to open file
#005: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5Fint.c line 1852 in H5F_open(): unable to open file: name = ‘░òyÑí☻’, tent_flags = 13
major: File accessibility
minor: Unable to open file
#006: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5FD.c line 769 in H5FD_open(): open failed
major: Virtual File Layer
minor: Unable to initialize object
#007: C:\autotest\hdf5114-StdRelease-dist-10vs17\build\hdfsrc\src\H5FDsec2.c line 326 in H5FD__sec2_open(): unable to open file: name = ‘░òyÑí☻’, errno = 22, error message = ‘Invalid argument’, flags = 13, o_flags = 302
major: File accessibility
minor: Unable to open file
Not sure if I am doing the setup wrong. I am quite new to H5CPP and VS. Any help is greatly appreciated. Thank you