Azure-Samples / iot-hub-c-raspberrypi-client-app

Application collects weather data from a BME280 sensor and sends it to IoT hub, also take actions according to cloud-to-device message, device management.
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-kit-c-get-started
MIT License
36 stars 34 forks source link

Recipe for target app failed #27

Closed Alberto-Vega closed 5 years ago

Alberto-Vega commented 6 years ago

This issue seems to be the same from #25 I saw that there is a workaround that I will try at some point. Hoping this gets resolved for future users trying the tutorial @SLdragon any insights on this? Below are the errors

-- Configuring done -- Generating done -- Build files have been written to: /home/pi/iot-hub-c-raspberrypi-client-app/iot-hub-c-raspberrypi-client-app [ 20%] Linking C executable app //usr/local/lib/libiothub_client.a(iothub_client_ll_uploadtoblob.c.o): In function IoTHubClient_LL_UploadToBlob_step1and2': iothub_client_ll_uploadtoblob.c:(.text+0x1018): undefined reference tojson_parse_string' iothub_client_ll_uploadtoblob.c:(.text+0x1084): undefined reference to json_value_get_object' iothub_client_ll_uploadtoblob.c:(.text+0x10fc): undefined reference tojson_object_get_string' iothub_client_ll_uploadtoblob.c:(.text+0x11e0): undefined reference to json_object_get_string' iothub_client_ll_uploadtoblob.c:(.text+0x1258): undefined reference tojson_object_get_string' iothub_client_ll_uploadtoblob.c:(.text+0x12d0): undefined reference to json_object_get_string' iothub_client_ll_uploadtoblob.c:(.text+0x1348): undefined reference tojson_object_get_string' iothub_client_ll_uploadtoblob.c:(.text+0x1814): undefined reference to `json_value_free' collect2: error: ld returned 1 exit status CMakeFiles/app.dir/build.make:172: recipe for target 'app' failed make[2]: [app] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/app.dir/all' failed make[1]: [CMakeFiles/app.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

yzhong94 commented 5 years ago

Thanks for creating the PR! Merged and confirmed that it's working.