我正在从arduino的AzureIotHub库的示例中编译iothub_ll_telemetry_sample。我遵循Azure/azure-iot-arduino github页面上显示的说明。
[我像-DDONT_USE_UPLOADTOBLOB -DUSE_BALTIMORE_CERT
这样将platform.txt
输入到build.extra_flags=-DESP8266 -DDONT_USE_UPLOADTOBLOB -DUSE_BALTIMORE_CERT
后,我编译了代码并在arduino IDE上收到了此错误
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o: in function `delete_event_callback_list':
C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1174: undefined reference to `IoTHubClient_LL_UploadToBlob_Destroy'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o: in function `IoTHubClientCore_LL_Destroy':
C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1729: undefined reference to `IoTHubClient_LL_UploadToBlob_Destroy'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o:(.text.initialize_iothub_client+0x60): undefined reference to `IoTHubClient_LL_UploadToBlob_Create'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o: in function `initialize_iothub_client':
C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:773: undefined reference to `IoTHubClient_LL_UploadToBlob_Destroy'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:872: undefined reference to `IoTHubClient_LL_UploadToBlob_Create'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:905: undefined reference to `IoTHubClient_LL_UploadToBlob_Destroy'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o: in function `create_blob_upload_module':
C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:383: undefined reference to `IoTHubClient_LL_UploadToBlob_Destroy'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o: in function `IoTHubClientCore_LL_CreateFromConnectionString':
C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1454: undefined reference to `IoTHubClient_LL_UploadToBlob_SetOption'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: libraries\AzureIoTHub\iothub_client_core_ll.c.o: in function `IoTHubClientCore_LL_SetOption':
C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1558: undefined reference to `IoTHubClient_LL_UploadToBlob_SetOption'
c:/users/abhij/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:2310: undefined reference to `IoTHubClient_LL_UploadToBlob_SetOption'
collect2.exe: error: ld returned 1 exit status
好像没有人能控制这些示例和库。将nodeMCU(v3)与AzureIoTHub库和dht_temperature_AzureIotHub_New示例结合使用时,我遇到相同的错误。解决了上面描述的缺少Blob的问题,并避免了未声明的MQTT_Protocol导致的错误之后,我必须添加“ iothubtransportmqtt.h”。
现在,在以下代码行中发生相同的错误“ collect2.exe:错误:ld返回了1个退出状态”:iotHubClientHandle = IoTHubClient_LL_CreateFromConnectionString(connectionString,MQTT_Protocol);
没有它,至少会编译。而且,如果没有Azure库,则开发板本身可以正常工作。我们可以在这里获得一些支持吗?