gpt4 book ai didi

linux - buildroot : predefs. h header 错误

转载 作者:太空宇宙 更新时间:2023-11-04 03:54:27 26 4
gpt4 key购买 nike

我正在使用 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 */

最佳答案

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

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

根据我的经验,这种方式对我来说效果很好

关于linux - buildroot : predefs. h header 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25227105/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com