linker problem using mbedtls component
Posted: Mon Aug 15, 2022 11:37 pm
Hi all -
I'm porting a program to the ESP32. I just enabled the portion of code that uses md5 (it supplies its own files for this) and now I can't link. When I try to use the files in my project folder, this code passage:results in this error:
But when I remove the local copy of md5.c from my CMakeLists.txt file, I get this:
Any ideas what's going on?
EDIT: The reason I included the line mbedtls_md5_init(&Zctx); above is to show that *some* of the functions in the file seem to be found. I tried a few others and they worked; there's just something about mbedtls_md5_starts().
I'm porting a program to the ESP32. I just enabled the portion of code that uses md5 (it supplies its own files for this) and now I can't link. When I try to use the files in my project folder, this code passage:
Code: Select all
mbedtls_md5_init(&Zctx);
mbedtls_md5_starts(&Zctx);
Code: Select all
C:/Espressif/frameworks/esp-idf-v4.4.1/components/mbedtls/mbedtls/library/md5.c:391: multiple definition of `mbedtls_md5'; esp-idf/main/libmain.a(md5.c.obj):C:\repos\iQPump-ESP32\fw\build/../main/md5.c:322: first defined here
Code: Select all
esp-idf/main/libmain.a(i2d_app.c.obj): in function `RS485_SendFirmwareBlocks':
C:\repos\iQPump-ESP32\fw\build/../main/i2d_app.c:1399: undefined reference to `mbedtls_md5_starts'
EDIT: The reason I included the line mbedtls_md5_init(&Zctx); above is to show that *some* of the functions in the file seem to be found. I tried a few others and they worked; there's just something about mbedtls_md5_starts().