【问题标题】:features.h not found solus linux, what is it and how do I get it?features.h 未找到 solus linux,它是什么以及如何获得它?
【发布时间】:2017-01-02 14:12:22
【问题描述】:
In file included from /usr/include/c++/5.3.0/x86_64-solus-linux/bits/c++config.h:482:0,
             from /usr/include/c++/5.3.0/cstdlib:41,
             from prog1.h:4,
             from prog1.cc:1:
/usr/include/c++/5.3.0/x86_64-solus-linux/bits/os_defines.h:39:22: fatal error: features.h: No such file or directory
compilation terminated.

我对 Linux/Unix 还很陌生,我正在尝试在 Solus 上进行基本的 c++ 编译(在虚拟机上运行)。我已经安装了 gcc 和 g++ 并且据我所知安装了标准 c++ 库。

但是,当我尝试编译程序时,我收到了上面显示的错误消息。这是我的头文件:

#ifndef PROG1_H
#define PROG1_H

#include<cstdlib>
#include<iostream>
#include<iomanip>
#include<vector>


const int VEC_SIZE = 250;
const int LOW = 1;
const int HIGH = 10000;
const int ITEMS_PER_LINE = 12;
const int ITEM_W = 5;
const int SEED = 1;

void genRndNums(vector<int>& v); // generates random integers and assigns them to the vector array

void printVec(const vector<int>& v); // prints the vector array, 12 numbers per line

#endif

由于某种原因,文件 features.h 丢失了,我不知道它是什么或如何获取它。如果有人可以提供帮助,我将不胜感激。

【问题讨论】:

标签: c++ linux compiler-errors


【解决方案1】:

请安装system.devel 组件。单独安装编译器是不够的,还需要头文件和库。

sudo eopkg it -c system.devel

把它想象成我们相当于build-essential

【讨论】:

  • IRC 上的人让我提到您需要确保您的系统在安装组件之前完全是最新的 :) sudo eopkg up
猜你喜欢
  • 1970-01-01
  • 2020-03-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-06
  • 2015-04-27
  • 1970-01-01
相关资源
最近更新 更多