2017-09-23 380 views
0

我正在尝试关注this tutorial以开始测试我的新型Adafruit Azure IoT入门套件,它带有Arduino Feather M0 Wifi。我能够在我的PC上安装Arduino IDE 1.8.4(来自Windows应用商店),这是一台Windows 10.在步骤1.8(构建您的远程监控示例)中,当我尝试编译解决方案“remote_monitoring.ino”dowonload从here,它出现以下错误:Arduino IDE在Windows中找不到sys/time.h

C:\iot-hub-c-m0wifi-getstartedkit-master\remote_monitoring\remote_monitoring.ino:12:22: fatal error: sys/time.h: No such file or directory

#include <sys/time.h>

compilation terminated.

exit status 1 Error compiling for board Arduino/Genuino Uno.

好像在Windows,包括SYS/time.h中只是不工作,但如果我尝试删除SYS /部分,它涉及以下错误:

C:\Users\jonguz\OneDrive - Microsoft\Documents\Arduino\libraries\AzureIoTHub\src/sdk/serializer.h:42:19: fatal error: cstdlib: No such file or directory

#include <cstdlib>

我很感激您的帮忙。

+0

您从** Tools> Board **菜单中选择了哪个电路板? – per1234

+0

感谢您的提示!正是这样,我没有选择董事会! :-) –

+0

很高兴它现在为你工作!我已经写了一个答案,所以这个问题可以有一个正式的决议,而不是只有一些意见。 – per1234

回答

0

sys/time.h和cstdlib位于Adafruit SAMD开发板硬件包(特别是arm-none-eabi-gcc)使用的工具链中。当在工具>板菜单中选择使用该工具的主板时,该工具中的文件仅被添加到包含搜索路径中。如果您没有选择其中一个电路板,则不会找到该文件,因此您遇到了错误消息。

https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/using-with-arduino-ide

Select the matching board, the current options are:

  • Feather M0 (for use with any Feather M0 other than the Express)

所以解决的办法是选择工具>主板> Adafruit的羽毛M0通过议会Manager安装Adafruit的SAMD板之后,但在编译之前草图。