Good Morning I'm trying to integrate with Azure IoT with Arduino Mega 2560. I imported the AzureIoTHub and AzureIoTUtility lib.

I just created this part of the code

 #include <AzureIoTHub.h>

void setup() {
  // put your setup code here, to run once:


void loop() {
  // put your main code here, to run repeatedly:


however, when I compile, I get the following error message.

In file included from C:\Users\MercurioNote\Documents\Arduino\libraries\AzureIoTUtility\src/azure_c_shared_utility/platform.h:7:0, from C:\Users\MercurioNote\Documents\Arduino\libraries\AzureIoTUtility\src/AzureIoTUtility.h:7, from C:\Users\MercurioNote\Documents\Arduino\libraries\AzureIoTHub\src/AzureIoTHub.h:7, from D:\Documents\Dev\Pocos\Arduino\ArduinoSolution\ArduinoSolution.ino\WiFiPoco\RoboCore\azureHub\azureHub.ino:3: C:\Users\MercurioNote\Documents\Arduino\libraries\AzureIoTUtility\src/azure_c_shared_utility/strings.h:8:10: fatal error: cstddef: No such file or directory #include

I imported ArduinoStl and the problem continued.

what am i doing wrong in this case?


  • Did you happen to read the (very short) list of supported hardware in the README of the Azure IoT library? It is only for ESP8266 and ESP32 (and then only specific ones by the look of it).
    – Majenko
    Sep 18 '20 at 13:49

Azure IoT is only supported on ESP8266 and ESP32. As stated in the README for the library:

Currently supported hardware:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.