DustinWatts / FreeTouchDeck

For interfacing with Windows/macOS/Linux using an ESP32, a touchscreen and BLE.
https://www.youtube.com/dustinwatts
MIT License
626 stars 128 forks source link

Compilation error caused by WebAuthentication.cpp #122

Closed loscorpione closed 6 months ago

loscorpione commented 9 months ago

During compilation with arduino 1.8.19 and/or IDE 2.2.1 it is interrupted with an error:

c:/users/loris/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: libraries\ESPAsyncWebServer\WebAuthentication.cpp.o:(.literal._ZL6getMD5PhtPc+0x8): undefined reference to 'mbedtls_md5_starts' c:/users/loris/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: libraries\ESPAsyncWebServer\WebAuthentication.cpp.o: in function getMD5(unsigned char*, unsigned short, char*)': C:\Users\Loris\Documents\Arduino\libraries\ESPAsyncWebServer\src/WebAuthentication.cpp:74: undefined reference to 'mbedtls_md5_starts' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for ESP32 Dev Module board.

following the advice of Sara Santos https://rntlab.com/question/esp32s2/

The problematic lines are lines 74, 75, and 76. Replace them with the following:

mbedtls_md5_starts_ret(&_ctx); mbedtls_md5_update_ret(&_ctx, data, len); mbedtls_md5_finish_ret(&_ctx, _buf);

this solution in case anyone has the same problem as me

github-actions[bot] commented 7 months ago

This issue has been stale for a while now