bvector.h致命错误没有这样的文件或目录

时间:2015-12-25 16:23:21

标签: c++ compiler-errors header

我使用的程序包含以下标题:

#include <iostream>
#include <bvector.h>
#include "eclat.h"

但是在构建时会给出这样的信息:

  

g++ -O3 -c enumerate.cpp
  enumerate.cpp:2:21:致命错误:bvector.h:Aucun fichier ou档案类型   编译终止。
  Makefile:22:目标&#39; enumerate.o&#39;失败   make:*** [enumerate.o]错误1

如果我更改为bvector.hvector,则代码无效并产生更多错误。

3 个答案:

答案 0 :(得分:2)

bvector.h不是标准的C ++头文件。 '&lt; &GT;”语法,而包含标题仅适用于标准头文件。

例如,stdio.h将作为#include <stdio.h>包含在程序中。如果bvector.h是您的头文件,则可以包含使用“”语法,如#include "bvector.h"

来源:https://getcomposer.org/doc/03-cli.md#init

答案 1 :(得分:1)

您只能对标准标题使用< >语法。 bvector.h似乎是你的包含,所以请改用" "

#include "bvector.h"

答案 2 :(得分:1)

您可以使用以下代码代替#include。它似乎是一个旧文件,并且在标准中没有(如果有的话)。

#include <vector>
typedef std::vector<bool, std::allocator<bool> > bit_vector;

例如,您可以查看this file