首页 > 解决方案 > 在 Visual Studio 2017 中读取 HDF5 文件的问题

问题描述

我正在尝试使用 c++ 语言在 Visual Studio 2017 中读取 hdf5 文件。我已经在项目中包含了头文件。他们没有给出任何错误。

#include "hdf5.h"
#include "H5Cpp.h"

我还将 hdf5 文件名设置为读取,它也没有给出任何错误。

const H5std_string    FILE_NAME(strFile);      //string strFile = "file.h5"

但是当我添加以下行时,它给出了一个错误 -

H5File                file(FILE_NAME, H5F_ACC_RDONLY);

调试器显示以下错误 -

在此处输入图像描述

这是我使用的配置 -
操作系统:Windows 10
Visual Studio - 2017
hdf - 1.12.0-Std-win10_64-vs14

有什么办法可以解决问题或任何其他方式来读取 hdf5 文件???

[注意:CCalibrationRecovery 是我的文件名,OnBnClickedButton16 是按钮事件处理程序。]

标签: visual-c++visual-studio-2017hdf5

解决方案


您可以使用 HDF5 1.12.0 版本并点击此链接。在 Visual Studio 2015、2017 和 2019 中使用它不会有任何问题。 链接


推荐阅读