"No such file or directory" CodeBlocks 中的 hashlib++ 库错误

"No such file or directory" error for hashlib++ library in CodeBlocks

我正在 CodeBlocks 中用 C++ 编写一个项目,我正在尝试使用 hashlib++ 库,我的代码中有它:

#include <hashlibpp.h>

当我单击 "build and run" 时,在那行代码上出现以下错误:

fatal error: hashlibpp.h: No such file or directory

我的整个 hashlib++ 库与我的 main.cpp 文件位于同一目录中。

我正在按照 http://hashlib2plus.sourceforge.net/doc/README.TXT.html 上的文档说明进行操作 但不是第 3.1 和 3.2 节中的说明不起作用,或者我没有正确遵循它们。

对于我为什么会收到此错误的任何见解,我将不胜感激。

好的,我知道问题出在哪里了。根据第 3.1 节,

  1. 在 "Management" 选项卡中转到您的项目,然后右键单击您正在处理的项目。如果看不到该部分,请转到“查看”>“管理器”,或按 Shift + F2。
  2. 右键单击后,select "add files..." 只需找到并添加您将使用的 .h 文件即可。在它应该出现在名为 "Headers".
  3. 的文件夹中的 "Management" 部分之后
  4. 在您的代码中输入适当的 #include 行。我下载了整个 hashlib2plus 文件夹并将其放在我的项目文件夹中,所以我的看起来像
    #include "hashlib2plus/trunk/src/hashlibpp.h"

希望这能解决未来的任何问题!