cmake build failing for tutorial-send-telemetry-iot-hub

RayBurquest-8772 0 Reputation points
2025-05-07T06:32:49.2733333+00:00

Hello

re https://learn.microsoft.com/en-us/azure/iot/tutorial-send-telemetry-iot-hub?pivots=programming-language-ansi-c

When I run the cmake command in this tutorial I get the following error

azure-iot-sdk-c/provisioning_client/samples/iothub_client_sample_hsm/iothub_client_sample_hsm.c:45:61: error: comparison of different enumeration types ('IOTHUB_CLIENT_CONNECTION_STATUS' (aka 'enum IOTHUB_CLIENT_CONNECTION_STATUS_TAG') and 'enum IOTHUB_CLIENT_CONFIRMATION_RESULT_TAG') [-Werror,-Wenum-compare]

   45 |         if (reason == IOTHUB_CLIENT_CONNECTION_OK && result == IOTHUB_CLIENT_CONFIRMATION_OK)

      |                                                     ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

make[2]: *** [provisioning_client/samples/iothub_client_sample_hsm/CMakeFiles/iothub_client_sample_hsm.dir/iothub_client_sample_hsm.c.o] Error 1

make[1]: *** [provisioning_client/samples/iothub_client_sample_hsm/CMakeFiles/iothub_client_sample_hsm.dir/all] Error 2

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
43,570 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.