![](/img/trans.png)
[英]Code::Blocks C++ compiling with MacOS Mojave : fatal error: sys/cdefs.h: No such file or directory
[英]gcc won't compile missing sys/cdefs.h
嘗試在armhf嵌入式設備上編譯gcc,但是在嘗試用xgcc編譯libgcc時說它找不到sys / cdefs.h,它會暫停。
libc6和libc6-dev已經安裝,可以在/ usr / arm-linux-gnueabihf / sys /中找到cdefs.h。
如何將/ usr / arm-linux-gnueabihf添加到xgcc包含路徑?
需要在配置行中添加--with-float=hard
。
這是因為MULTIARCH_DIRNAME是基於with-float配置選項定義的
MULTIARCH_DIRNAME = $(call if_multiarch,arm$(ARM_EB)-linux-gnueabi$(if $(filter hard,$(with_float)),hf))
正如gcc的好伙伴指出的那樣
將參數-I/usr/arm-linux-gnueabihf
到compile語句
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.