[英]C compiler error: cdefs.h not found
(There are similar questions answered but none really applies to this) (有类似的问题得到解答,但没有一个真正适用于此)
I have a board with Fedora 20 and armv71 architecture (32-bit). 我有一个Fedora 20和armv71架构(32位)的主板。 I have installed all the gcc libraries via yum which are required such as
gcc
, g++
, cmake
, glibc
, glibc-devel
etc. ( glibc-devel
is equivalent of libc6-dev-i386
in Fedora). 我已经通过yum安装了所有需要的gcc库,如
gcc
, g++
, cmake
, glibc
, glibc-devel
等。( glibc-devel
相当于Fedora中的libc6-dev-i386
)。
I'm trying to compile a C project, which compiles just fine on MAC OS 64-bit and Ubuntu 64-bit, but gives me the following error on Fedora 20 when I run make
: 我正在尝试编译一个C项目,它在MAC OS 64位和Ubuntu 64位上编译得很好,但在运行
make
时在Fedora 20上给出了以下错误:
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
When I check /usr/include/sys
folder, it is empty and cdefs.h
file does not exist anywhere on the system. 当我检查
/usr/include/sys
文件夹时,它是空的,并且cdefs.h
文件在系统的任何地方都不存在。
The problem seems to be I'm missing a package (possibly?) but cannot figure out which one is missing since I seem to have all installed. 问题似乎是我错过了一个包(可能?)但是无法弄清楚哪一个丢失了,因为我好像已经安装了所有。 Or 32-bit C compiler missing that file for a specific reason?
或者32位C编译器因特定原因缺少该文件? Any help would be appreciated.
任何帮助,将不胜感激。
使用此命令(或类似的命令,具体取决于您的操作系统)
apt-get install libc6-dev-i386
Since you are on an RPM-based distro, you can do this: 由于您使用的是基于RPM的发行版,因此可以执行以下操作:
# yum provides '*sys/defs.h'
and let the tool do the hard part. 让工具做艰难的部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.