gpt4 book ai didi

compiler-errors - 为什么 HDF5 在这里给出 "too few arguments"错误?

转载 作者:行者123 更新时间:2023-12-02 10:56:31 25 4
gpt4 key购买 nike

我正在尝试编译一个使用 HDF5 的包,但失败并显示:

read_hdf5_c.c:537:100: error: too few arguments to function call, expected 8, have 7
H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, i, &object_info, H5P_DEFAULT);
~~~~~~~~~~~~~~~~~~ ^
/usr/local/include/H5Opublic.h:190:8: note: 'H5Oget_info_by_idx3' declared here
H5_DLL herr_t H5Oget_info_by_idx3(hid_t loc_id, const char *group_name,
^
H5Oget_info_by_idx3的定义在 H50public.h
H5_DLL herr_t H5Oget_info_by_idx3(hid_t loc_id, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info2_t *oinfo,
unsigned fields, hid_t lapl_id);

这确实有 8 个论点。调用代码只传了 7 个参数,官方文档中也只列出了 7 个参数:

https://support.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfoByIdx

缺少的是 unsigned fields .

我安装的 hdf5 开发库会过时吗?这第 8 个参数被删除了吗?

我正在运行 hdf5 1.12.0

最佳答案

似乎从 hdf5 1.12.0 开始,当他们引入 H5Oget_info_by_idx3 时,界面发生了一些变化(参见 changelog )并且 API 文档落后。
我可以通过设置 fields 让它在我的项目中编译(更重要的是也可以运行)至H5O_INFO_BASIC .如果您需要的某些字段未包含在对象信息结构中,则还有 H5O_INFO_ALL这可能会奏效。

关于compiler-errors - 为什么 HDF5 在这里给出 "too few arguments"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62157364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com