Make sure you have an Azure IoT SDK to compile successfully. For example I used an Arduino development environment with the following Arduino Libraries: AzureIoTUtility, AzureIoTProtocol_MQTT, AzureIoTProtocol_HTTP all at version 1.0.45
.
It's recomened you use Visual Studio Code extension for Arduino, install it from here. You can also use Azure IoT Workbench or iotz to compile this sample.
Select the MXCHIP board type
VS Code by ctrl + shift + p
Then choose task Arduino: Upload