【发布时间】:2021-03-11 07:34:30
【问题描述】:
我正在尝试测试 tarray.cpp。我知道你可以使用 cmake,但我需要在项目中使用 G++。我只需要测试 tarray 部分及其依赖项。我将 tarray 及其所有依赖项放在同一个文件夹中。但是,当我尝试编译它时,我得到了这个错误:
$ g++ tarray.cpp -o tarray
在 H5Cpp.h:18:0 包含的文件中,来自 tarray.cpp:28:
H5Include.h:15:10: fatal error: hdf5.h: No such file or directory
#include <hdf5.h>
^~~~~~~~
compilation terminated.
我在同一个文件夹中有 hdf5,所以我不知道为什么它没有检测到它。
【问题讨论】:
-
试试
#include "hdf5.h"。尖括号表示在系统目录中搜索,双引号也表示在当前目录中搜索。