RT-Thread RTThread studio 初使用
RT-Thread Studio 下载
https://www.rt-thread.org/studio.html
安装使用
https://bbs.elecfans.com/jishu_2425653_1_1.html
4 编译问题解决
问题一:error: unknown type name 'clock_t'
具体的类型值是在sys/_types.h中定义的,需要包含sys/_types.h 这个头函数,因为在types 中宏定义了这个 #define _SYS_TYPES_H, 导致sys/_types.h这个头文件没有被引用,
在构建配置里面添加_POSIX_C_SOURCE=1 就可以了
问题二:error: 'NULL' undeclared (first use in this function)
缺少相应的头文件导致的。
#include <stddef.h>
在cstdlib.c中添加相应的头文件即可。