Forum Discussion
Errors building Azure IoT C SDK examples for ESP32. Help setting up toolchain?
I've been building, flashing, and running various other code for the ESP32 using Azure IoT including examples from Microsoft where I'm using PlatformIO, and I'm not sure why this one won't work.
I'm getting various errors when trying to build the Azure IoT C SDK. I'm trying to build any C SDK example that demonstrates AMQP and multiplexing in a threaded manner, preferably connecting directly to Azure IoT Central rather than IoT Hub, but I can't get that far in Visual Studio or VSCode regardless of the toolchain, using ESP-IDF, PlatformIO, or directly.
I've cloned the repository here (https://github.com/Azure/azure-iot-sdk-c) intending to use the example here (https://github.com/Azure/azure-iot-sdk-c/tree/main/iothub_client/samples/iothub_client_sample_amqp_shared_methods )
Regardless, I get this error:
CMake Error at configs/azure_iot_sdksFunctions.cmake:219 (if):
if given arguments: "(" "CMAKE_BUILD_TYPE" "STREQUAL" "debug" ")" "AND" "(" "GREATER_EQUAL" "1930" ")"
Trying to build the example, I get:
iothub_client_sample_amqp_shared_methods.c:14:10: fatal error: azure_c_shared_utility/platform.h: No such file or directory
14 | #include "azure_c_shared_utility/platform.h"
This happens regardless of what relative or absolute path I use to any of many azure_c_shared_utility/platform.h files inside the top-level azure-iot-sdk-c repository.
Can someone help walk me through the process? Preferably with something more convenient for rapid prototyping like PlatformIO or ESP-IDF inside VSCode, rather than relying on CLI and tedious commands to build, flash, debug, etc.
2 Replies
- JP_publicCopper Contributor
Anybody?
- Tom_BulsinkCopper Contributor
You should probably clone the git repository *recursively*. There are a lot of submodules in there (and submodules of submodules) which are not cloned if git is not specifically instructed to do so.