Search code examples
azureazure-iot-hubazure-iot-sdk

Having a problem with installing the Azure IoT SDK for C


I am following the MS docs quickstart on creating an IoT Plug and Play device for Windows i.e Quickstart: Use a device capability model to create an IoT Plug and Play Preview device (Windows) and I'm having issues preparing the development environment.

When I get to installing the SDK with vcpkg (step 2 in preparing the dev environment section) running this command gives me an error:

.\vcpkg.exe install azure-iot-sdk-c[public-preview,use_prov_client]

enter image description here

It doesn't seem to take the use_prov_client flag. If I remove that flag the SDK installs correctly but then the rest of the quickstart doesn't compile as it apparently needs the client portions of the SDK installed.

Can anyone help with this? I'm not sure why it won't take that flag.

Thanks.


Solution

  • So here is the workaround...

    Go to the Folder : C:\Users\satish\vcpkg\ports\azure-iot-sdk-c

    1. Edit the CONTROL file in any file editor, update use_prov_client as use-prov-client

    enter image description here

    1. Edit the portfile.cmake file : update use_prov_client as use-prov-client

    enter image description here

    1. run

    .\bootstrap-vcpkg.bat

    1. run

    .\vcpkg.exe install azure-iot-sdk-c[public-preview,use-prov-client]

    Finally...

    enter image description here

    Please let us know if you need further help.