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中添加相應的頭文件即可。