您尚未登录。

楼主 # 2024-06-22 13:27:31

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,280
积分: 1229.5

求助,d133编译报错找不到stddef.h。

win10下,sdk应该是1.0.4, 之前编译通过了。今天尝试再次编译,结果报错找不到stddef.h这个文件。
编译d133默认工程也是报这个错误。
搜了下,在rtdef.h里有:

#include <rtconfig.h>
#ifdef RT_USING_LIBC
#include <stdint.h>
#include <stddef.h>
#include <stdarg.h>
#endif /* RT_USING_LIBC */

又搜到:

在开启了 RT_USING_LIBC 后,GCC 编译使用 newlib
未开启 RT_USING_LIBC 时,GCC 编译使用 minilibc
dlib 是 RT-Thread 针对 IAR 编译器的移植适配(使用标准库接口时注意开启 RT_USING_LIBC)
armlibc 是 RT-Thread 针对 MDK 编译器的移植适配

https://blog.csdn.net/wandersky0822/article/details/120130059

但是,我印象中我没做啥设置修改啊。

-----------------------------

在me菜单里,搜了下RT_USING_LIBC,看其依赖关系,现在没处于选中状态啊。

-----------------------------

> m
scons: Reading SConscript files ...
args.outfile:  F:\MCU\ArtinChip\luban-lite/partition_table.h
cc1.exe: warning:  is shorter than expected
Newlib version:3.2.0
F:\MCU\ArtinChip\luban-lite\kernel\rt-thread
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: output\d13x_kunlunpi88-nor_rt-thread_helloworld
  CC application\rt-thread\helloworld\main.c
  CC bsp\artinchip\drv\audio\drv_audio.c
In file included from kernel\rt-thread\include/rtthread.h:27,
                 from application\rt-thread\helloworld\main.c:9:
kernel\rt-thread\include/rtdef.h:55:10: fatal error: stddef.h: No such file or directory
   55 | #include <stddef.h>
      |          ^~~~~~~~~~
compilation terminated . CC bsp\artinchip\drv\audio\drv_dmic.c

最近编辑记录 Gentlepig (2024-06-22 13:51:49)

离线

楼主 #1 2024-06-22 14:13:44

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,280
积分: 1229.5

Re: 求助,d133编译报错找不到stddef.h。

找到问题了,sdk/toolchain目录下有些文件被删除了,其中有个include文件夹下原来是有stddef.h这个文件的。
现在将toolchain删了,再打开win_evn.bat时,会重新解压生成该目录。
想了想,可能是前两天在ubuntu下打开了win下的这个sdk,好像用me命令查看配置,也许这个时候对toolchains目录做了修改。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn