Azure / azure-iot-arduino

Azure IoT library for the Arduino
Other
167 stars 96 forks source link

fatal error: undefined reference to IoTHubClient_LL_UploadToBlob_Destroy'` etc #105

Closed abhijith452 closed 4 years ago

abhijith452 commented 4 years ago

I was Compiling code for nodemcuesp8266 and i got this error

``C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src\iothub_client_ll_uploadtoblob.c:26:27: fatal error: internal/blob.h: No such file or directory

include "internal/blob.h"

                       ^

compilation terminated.

exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module)``

khushvir commented 4 years ago

@ForgottenTale have you followed the steps properly https://github.com/Azure/azure-iot-arduino#esp8266

I also faced the same issue.

abhijith452 commented 4 years ago

Actually i didn't. Later on after i did. After i entered -DDONT_USE_UPLOADTOBLOB -DUSE_BALTIMORE_CERT to the platform.txt like this build.extra_flags=-DESP8266 -DDONT_USE_UPLOADTOBLOB -DUSE_BALTIMORE_CERT, i compiled the code and got this error on the 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 functiondelete_event_callback_list':`

C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1174: undefined reference toIoTHubClient_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 functionIoTHubClientCore_LL_Destroy':`

C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1729: undefined reference toIoTHubClient_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 toIoTHubClient_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 functioninitialize_iothub_client':`

C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:773: undefined reference toIoTHubClient_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 toIoTHubClient_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 toIoTHubClient_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 functioncreate_blob_upload_module':`

C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:383: undefined reference toIoTHubClient_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 functionIoTHubClientCore_LL_CreateFromConnectionString':`

C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1454: undefined reference toIoTHubClient_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 functionIoTHubClientCore_LL_SetOption':`

C:\Users\abhij\Documents\Arduino\libraries\AzureIoTHub\src/iothub_client_core_ll.c:1558: undefined reference toIoTHubClient_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 toIoTHubClient_LL_UploadToBlob_SetOption'`

collect2.exe: error: ld returned 1 exit status

abhijith452 commented 4 years ago

@ForgottenTale have you followed the steps properly https://github.com/Azure/azure-iot-arduino#esp8266

I also faced the same issue.

Am i getting this error cause i added the -DDONT_USE_UPLOADTOBLOB -DUSE_BALTIMORE_CERT to the platform.txt improperly ? Also i couldn't find tlsio_mbedtls.c is in the adapters folder but i couldn't understand where to look for tlsio_mbedtls.c to check if it is defined or not

abhijith452 commented 4 years ago

After i restarted my pc. Its working.