【问题标题】:buildroot : predefs.h header errorbuildroot:predefs.h 标头错误
【发布时间】:2014-08-10 09:05:23
【问题描述】:

我正在使用 buildroot 为 Raspberry 构建操作系统。编译时出现此错误

BuildRoot/bsquask/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include/bits/predefs.h:20:3: error: #error "Never use <bits/predefs.h> directly; include <features.h> instead."
 # error "Never use <bits/predefs.h> directly; include <features.h> instead."

我在网上搜索,some 为这个标题打了一个补丁并修改它,他们说它可以但不适合我(我找到了很多补丁)

predefs.h

#ifndef _FEATURES_H
# error "Never use <bits/predefs.h> directly; include <features.h> instead."
#endif

#ifndef _PREDEFS_H
#define _PREDEFS_H

/* We do support the IEC 559 math functionality, real and complex, but only
   if a VFP coprocessor is present. If we don't have one, we fall back to
   software emulation and the functions won't work properly. So in general,
   we don't claim to support this functionality.  */
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
#define __STDC_IEC_559__        1
#define __STDC_IEC_559_COMPLEX__    1
#endif

#endif /* predefs.h */

【问题讨论】:

    标签: linux header patch buildroot


    【解决方案1】:

    通过忽略错误来编辑文件(注释行)

    #ifndef _FEATURES_H
    //# error "Never use <bits/predefs.h> directly; include <features.h> instead."
    #endif
    

    根据我的经验,这种方式对我很有效

    【讨论】:

      猜你喜欢
      • 2016-04-21
      • 2018-11-26
      • 1970-01-01
      • 1970-01-01
      • 2018-09-14
      • 1970-01-01
      • 2015-05-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多