如何修复 Arduino error: 'size_t' has not been declared
问题:
在 Arduino 中,你看到类似这样的错误消息
compile_error.txt
src/main.cpp:7:48: error: 'size_t' has not been declared
void MyFunction(size_t size);解决方案
包含声明 size_t 的 stddef.h:
include_stddef.h
#include <stddef.h>将此行添加到错误发生的文件顶部。
Check out similar posts by category:
Arduino, C/C++, Embedded, PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow